How to Install phpIPAM on Fedora CoreOS Latest

phpIPAM is an open-source web-based IP address management application that allows you to organize and manage your IP addresses, subnets, VLANs, and circuits. In this tutorial, we will show you how to install phpIPAM on Fedora CoreOS Latest.

Prerequisites

Before starting with the installation, make sure you have the following prerequisites:

Step 1: Update Fedora CoreOS

First, you need to update your Fedora CoreOS server to the latest version available. To do this, log in to your server and run the following command:

$ sudo rpm-ostree upgrade

The command will check for the latest software updates available and update your Fedora CoreOS server.

Step 2: Install Apache Web Server

phpIPAM requires an Apache web server to function. You can install Apache on Fedora CoreOS using the following command:

$ sudo rpm-ostree install httpd

After installing Apache, start the Apache service and enable it to start automatically at boot time using the following commands:

$ sudo systemctl start httpd
$ sudo systemctl enable httpd

Step 3: Install PHP and Required PHP Modules

To run phpIPAM, you need to install PHP and some PHP modules on your Fedora CoreOS server. You can install them using the following command:

$ sudo rpm-ostree install php php-pdo php-mysqlnd php-json php-xml php-mbstring php-gd php-ldap

After installing PHP and required PHP modules, you need to restart the Apache web server to apply the changes:

$ sudo systemctl restart httpd

Step 4: Install MariaDB Server

phpIPAM requires a database to store its data. You can use any MySQL-compatible database server. In this tutorial, we will use MariaDB. To install MariaDB on your Fedora CoreOS server, use the following command:

$ sudo rpm-ostree install mariadb mariadb-server mariadb-libs

After installing MariaDB, start the MariaDB service and enable it to start automatically at boot time using the following commands:

$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb

Step 5: Secure MariaDB Server

It is recommended to secure your MariaDB server by running the built-in script provided by MariaDB. You can run the script using the following command:

$ sudo mysql_secure_installation

The script will ask you a series of questions to secure your MariaDB installation. You can follow the on-screen instructions to answer the questions.

Step 6: Create a Database for phpIPAM

After securing your MariaDB server, you need to create a new database and user for phpIPAM.

Log in to your MariaDB server using the following command:

$ sudo mysql -u root -p

When prompted, enter the MariaDB root user password.

Once you are logged in to the MariaDB server, create a new database and user using the following commands:

CREATE DATABASE phpipam;
CREATE USER 'phpipam'@'localhost' IDENTIFIED BY 'NEW_PASSWORD';
GRANT ALL PRIVILEGES ON phpipam.* TO 'phpipam'@'localhost';
FLUSH PRIVILEGES;
quit

Replace NEW_PASSWORD with a strong password for the phpipam user.

Step 7: Install phpIPAM

Download the latest version of phpIPAM from the official website:

$ sudo wget https://github.com/phpipam/phpipam/archive/master.zip

Extract the downloaded archive using the following command:

$ sudo unzip master.zip -d /var/www/html/

Rename the extracted directory to phpipam and change its ownership and permissions using the following commands:

$ sudo mv /var/www/html/phpipam-master /var/www/html/phpipam
$ sudo chown -R apache:apache /var/www/html/phpipam
$ sudo chmod -R 755 /var/www/html/phpipam

Step 8: Configure phpIPAM

Copy the sample configuration file to a new file using the following command:

$ sudo cp /var/www/html/phpipam/config.dist.php /var/www/html/phpipam/config.php

Open the config.php file using a text editor:

$ sudo vi /var/www/html/phpipam/config.php

Find the following lines in the file:

$config['db'] = array(
    'host' => 'localhost',
    'user' => '',
    'pass' => '',
    'name' => '',
    'port' => 3306,
    'socket' => ''
);

Change the following lines with your MariaDB database settings:

$config['db'] = array(
    'host' => 'localhost',
    'user' => 'phpipam',
    'pass' => 'NEW_PASSWORD',
    'name' => 'phpipam',
    'port' => 3306,
    'socket' => ''
);

Replace NEW_PASSWORD with the password you set for the phpipam database user.

Step 9: Access phpIPAM

Open a web browser and browse to your server IP address with /phpipam at the end of the URL, for example:

http://192.168.0.10/phpipam

You should see the phpIPAM login page. Log in with the default username admin and password ipamadmin.

Congratulations! You have successfully installed phpIPAM on Fedora CoreOS Latest. Now you can start managing your IP addresses, subnets, VLANs, and circuits using phpIPAM.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!