Today’s guide will be on how to install phpIPAM on CentOS 8 / RHEL 8 Linux distribution. phpIPAM is the leading open-source web-based tool for IP address management application (IPAM). phpIPAM is written in PHP to provide a modern and useful IP address management features. This tool jQuery libraries, Ajax and HTML5/CSS3 with MySQL being a database backend.

Features of phpIPAM

Here are the top features of phpIPAM.

  • IPv4/IPv6 IP address management
  • Section / Subnet management
  • Automatic free space display for subnets
  • Visual subnet display
  • Automatic subnet scanning / IP status checks
  • PowerDNS integration
  • NAT support
  • VLAN management
  • VRF management
  • IPv4 / IPv6 calculator
  • IP database search
  • E-mail notifications
  • Custom fields support
  • Translations
  • Changelogs
  • RACK management
  • Domain authentication (AD, LDAP, Radius)
  • Per-group section/subnet permissions
  • Device/device types management
  • RIPE subnets import
  • XLS / CVS subnets import
  • IP request module
  • REST API
  • Locations module

Install phpIPAM on CentOS 8 / RHEL 8 Linux

phpIPAM has a number of dependencies that we’ll need to install first.

  1. MySQL / MariaDB database server.
  2. PHP / PHP-FPM
  3. A number of PHP extensions
  4. A web server – Apache / Nginx

In this installation of phpIPAM on CentOS 8 / RHEL 8, we’ll use Apache as our preferred web server.

Step 1: Install httpd and PHP

Let’s kickoff with the installation of a web server (Apache httpd), PHP and required PHP extensions.

sudo dnf -y install @httpd
sudo dnf -y install @php
sudo dnf -y install  php-{mysqlnd,curl,gd,intl,pear,recode,xmlrpc,mbstring,gettext,gmp,json,xml,fpm}

Start and enable both httpd and php-fpm services.

sudo systemctl enable --now httpd php-fpm

Confirm status returns running.

Step 2: Install MariaDB Database server

The next step is the installation of MariaDB. Follow the guide below to install it.

Install MariaDB on CentOS / RHEL 8

Once the installation is done, login to MySQL CLI as root user and create phpIPAM database and user.

$ mysql -u root -p

CREATE DATABASE phpipam;
GRANT ALL ON phpipam.* TO [email protected] IDENTIFIED BY '[email protected]';
FLUSH PRIVILEGES;
QUIT;

Step 3: Install phpIPAM on CentOS 8 / RHEL 8

Pull the latest source code of phpIPAM from the Github repository.

sudo dnf -y install git
sudo git clone --recursive https://github.com/phpipam/phpipam.git /var/www/html/phpipam

Configure phpIPAM:

cd /var/www/html/phpipam

Copy config.dist.php to config.php.

sudo cp config.dist.php config.php

Edit the file:

sudo vi config.php

Configure database credentials as added on Step 2:

/**
* database connection details
******************************/
$db['host'] = 'localhost';
$db['user'] = 'phpipam';
$db['pass'] = '[email protected]';
$db['name'] = 'phpipam';
$db['port'] = 3306;

Step 4: Configure Apache web server

Create an Apache httpd configuration file for phpIPAM on CentOS 8 / RHEL 8.

$ sudo vi /etc/httpd/conf.d/phpipam.conf

Add:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/var/www/html/phpipam"
    ServerName phpipam.computingforgeeks.com
    ServerAlias www.phpipam.computingforgeeks.com
    <Directory "/var/www/html/phpipam">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "/var/log/httpd/phpipam-error_log"
    CustomLog "/var/log/httpd/phpipam-access_log" combined
</VirtualHost>

Change ownership of the /var/www/phpipam directory to www-data user and group.

sudo chown -R apache:apache /var/www/html/

Validate your httpd configurations.

$ sudo apachectl -t
Syntax OK

If all looks good, restart httpd service.

sudo systemctl restart httpd

Status should indicate running without any errors.

$ systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Wed 2019-10-02 19:10:28 EAT; 5s ago
     Docs: man:httpd.service(8)
 Main PID: 20828 (httpd)
   Status: "Started, listening on: port 443, port 80"
    Tasks: 213 (limit: 11512)
   Memory: 24.9M
   CGroup: /system.slice/httpd.service
           ├─20828 /usr/sbin/httpd -DFOREGROUND
           ├─20830 /usr/sbin/httpd -DFOREGROUND
           ├─20831 /usr/sbin/httpd -DFOREGROUND
           ├─20832 /usr/sbin/httpd -DFOREGROUND
           └─20833 /usr/sbin/httpd -DFOREGROUND

Oct 02 19:10:28 centos8.novalocal systemd[1]: Stopped The Apache HTTP Server.
Oct 02 19:10:28 centos8.novalocal systemd[1]: Starting The Apache HTTP Server...
Oct 02 19:10:28 centos8.novalocal httpd[20828]: Server configured, listening on: port 443, port 80
Oct 02 19:10:28 centos8.novalocal systemd[1]: Started The Apache HTTP Server.

Step 5: Finish phpIPAM Installation

Open the Server domain URL on http://domain.com, replace domain.com with your valid domain name.

Select “New phpipam installation“. On the next page, choose the database installation method.

Select MySQL import instructions. This will print the command to import SQL file.

sudo mysql -u root -p phpipam < /var/www/html/phpipam/db/SCHEMA.sql

When done, click the login button.

The default Login credentials are:

Username: admin
Password: ipamadmin

You’re prompted to change the admin password on the first login.

The phpIPAM installation on CentOS 8 / RHEL 8 has been completed successfully.

You can start adding Subnets or use the discovery feature to pull subnets available in your network. phpIPAM is one of my favorite Network Management tool. I hope you enjoy using it.

Similar guides:

Install and Configure phpIPAM on Ubuntu 18.04 / Debian 10

Install and Configure phpIPAM on Ubuntu

Install Racktables on Ubuntu

Install Netbox on CentOS 7