Install phpIPAM on Ubuntu

In this tutorial, we are going to explain, how to install and configure phpIPAM on LAMP (Linux, Apache, MySQL, and PHP) stack running on Ubuntu Cloud server. Let us first understand PhpIPAM.

phpIPAM is a devoted tool for IP address management, go down that road the low tech choices by giving automatic ping filters, status reports that let you view which of your web hosts are up and which are down, email notices about modifications to the hosts you're observing, and different highlights that make overseeing foundation significantly less demanding.



Before you start, you will need:


  • One ubuntu based cloud server containing a sudo non-root user access and a firewall.

  • A registered website domain name. In this tutorial we uses xyz.xom. You can buy web hosting from us and get a domain name of your choice.

  • The accompanying DNS records set up for your web server. You can check our tutorial for detailed information on how to add them.

  • You need to add an A record with  directing to your public IP address.

  • You need to add an A record with  directing to your public IP address.

  • A LAMP stack build up by subsequent Linux, Apache, MySQL, PHP installation tutorial.

  • An Apache server vhost deployed on your domain name.

  • A let’s Encrypt SSL certificate installed on your domain name.


Steps to setup phpIPAM


Step 1: Configuring Apache: phpIPAM depends on query strings to pass information in its URL structure, these query string are attached with ‘?’ and includes a minimum one field value set isolated by ‘&’ to a URL by default. Though Apache is not fully required for installation but needs to be installed by phpIPAM supports URL-rewriting using the method of Apache's mod_rewrite module that helps to make the inquiry strings more clear and human- accommodating URLs.


Step 1.1: On the odd chance that you didn't officially empower mod_rewrite in the safe mode that is your Apache installation with a TLS/SSL certificate requirement by diverting all HTTP requests to HTTPS, utilize Apache a2enmod utility now to empower mod_rewrite so you can turn URL-revamping on in the next step.


$ sudo a2enmod rewrite


The above command constructs a symbolic connection to /etc/apache2/mods-available/rewrite.load in /etc/apache2/mods-enabled/rewrite/

which will empower the module on Apache's next begin.

On the odd chance that mod_rewrite as of now was empowered, the output will read:

The result of sudo a2enmod rewrite command

Module rewrite already enabled


Or else, the result will reveal to you that the symlink was accomplished and that you have to restart Apache to actuate the change.

The result of sudo a2enmod rewrite command

Enabling module rewrite.

To activate the new configuration, you need to run:

service apache2 restart


Despite the fact Apache web server will hereafter enable mod_rewrite whenever you begin the web server, regardless you need to change your phpIPAM virtual host setting to make mod_rewrite approachable to phpIPAM. In this way, don't restart Apache directly

Rather, open the Apache server configuration file you are made for phpIPAM in the Prerequisites.

sudo nano /etc/apache2/sites-available/

Put the below-mentioned lines into the configuration file:


  <Directory /var/www/

          Options FollowSymLinks

          AllowOverride all

          Require all granted



Now save and close the file to make a start.

Step 1.2: Testing the Setup: Presently, test the setup changes before restarting Apache web server.

sudo apache2ctl configtest

On the odd chance that the output says Syntax OK, you're prepared to proceed onward.

Step 1.3:At last, restart Apache server to enable mod_rewrite and enact the new set up.

sudo systemctl restart apache2

Step 2 : Installing phpIPAM

The official establishment guidelines recommend two strategies for installing phpIPAM: downloading a tarball from the project's SourceForge archive or cloning the project from its GitHub vault. To make future updates less demanding, we should utilize the last strategy.

As a matter of course, Git will just clone into a current directory if that particular directory is unfilled. In this way, utilize the ls command to see the substance of the directory you designed for Apache in 1st step.

ls /var/www/

In the event that the directory is not empty, utilize fundamental Linux route and record administration commands to get it out at this point. mv moves the substance to an alternate area, and rm erases them out and out.

Presently, clone the Git project into the directory.

git clone /var/www/

The result affirms the location you are going to clone into and after that gives a continuous report of the process, including a tally of the items Git anticipated that would copy and in addition the number it really copied.

Result of git clone

Cloning into /var/www/ ...

remote: Counting objects: 15749, done.

remote: Compressing objects: 100% (50/50), done.

remote: Total 15749 (delta 27), reused 40 (delta 17), pack-reused 15741

Receiving objects: 100% (15749/15749), 15.38 MiB | 31.30 MiB/s, done.

Resolving deltas: 100% (15741/15741), done.

Checking connectivity... done.

You now have the total phpIPAM application on your web server, yet despite everything you're feeling the loss of some PHP modules that phpIPAM needs so as to run. Introduce them with apt-get.

sudo apt-get install php7.0-gmp php7.0-mbstring php-pear php7.0-gd


Restart Apache web server in order to make the new modules accessible to it.

sudo systemctl restart apache2

With both the application documents and extra modules on the server, you're prepared to design phpIPAM.

Step 3: Configuring phpIPAM


phpIPAM searches for its principle configuration settings in a record called config.php. While this document doesn't exist, of course, the application comes with an illustration configuration file to work from.

Modify to the installation directory and influence a duplicate of the illustration setup to file to allude to later in the event that you experience an issue.

$ cd /var/www/

$ cp config.dist.php config.php

Open the new file for editing.

$ nano config.php

Search for the section marked * database connection details. These settings reveal to phpIPAM how to interface with the MySQL database that will hold the majority of your information.

Since you've installed MySQL on an indistinguishable machine from phpIPAM, you can leave the $db['host'] value set to localhost. What's more, in light of the fact that MySQL tunes in on port 3306 as a matter of course, you do not have to modify the $db['port'] value.

phpIPAM's config.php




* database connection information


$db['host'] = 'localhost';

$db['user'] = 'database_user';

$db['pass'] = 'database_password';

$db['name'] = 'database_name';

$db['port'] = 2082;

When you are finished altering, save and close the document.


Step 4: Creating the Database & Database User

Explore your browser to You will see the phpIPAM establishment main screen inviting you to the wizard and soliciting you to pick the sort from installation you need to perform. In case you're not ready to bring this screen up, check that your firewall is not blocking access on port 80 and follow the past steps to determine the issue.

Here you will have three alternatives on the screen -

  1. New phpipam installation,
  2. Migrate phpipam installation, and
  3. Working installation

each one with a short description of its motive. As you are setting up another phpIPAM installation, hit the button stamped New phpipam installation.


On the following screen, the wizard describes whatever is left of the installation procedure, directs you toward the official installation documentation for additional points of details, and solicits you to choose which compose from database installation you'd get a kick out of the chance to perform.

Step 5: you have three options:

Automatic database installation: The wizard will utilize the data you went into config.phpin Step 3 to make a MySQL database and client.

MySQL import instructions: You will utilize MySQL's own mysqlimport utility to make the database from plain text documents you give.

Manual database installation: The wizard will supply you with the default SQL charges you have to make another phpIPAM database physically.

It is preferred to choose  Automatic database installation  for the completely computerized alternative catch.


You can get to extra installation alternatives by tapping on the Show advanced options catch. Here, you'll be given three more options:

  • Drop existing database: Before running the installation method, the wizard will endeavor to erase a database with an indistinguishable name from the incentive in the MySQL database name field. This is switched off as a matter of course.

  • Create database: The wizard will endeavor to make a database with an indistinguishable name from the incentive in the MySQL database name field. This is turned on as a matter of course.

  • Create permissions: The wizard will endeavor to set consents on the new database, restricting access to just the MySQL client characterized in config.php. This is turned on of course.


Enter the username & password key for the MySQL client you need the wizard to associate as, leave the advanced options set to their default esteems, and press the Install phpipam database button..

Hit Continue to proceed with the installation.

On this window, the wizard prompts you to set the administrator client secret word for the web interface, the title to show at the highest point of each phpIPAM web interface screen, and the URL for your phpIPAM installation.

Enter the administrator password you'd get a kick out of the chance to utilize, a distinct title for your phpIPAM interface, and the completely qualified website domain name that focuses to your phpIPAM installation, at that point hit the Save settings button.

You should now observe an affirmation message disclosing to you that the settings were effectively saved. In the event that you don't, utilize the wizard's mistake messages to analyze the issue.

Tap the Proceed to login button to go to your phpIPAM installation’s landing page, and sign-in with the administrator username and secret word you entered in the Admin password section.

phpIPAM Installation and setup are presently complete, so you can start adding data to deal with the systems you screen all the more effortlessly.

Following the above, you can successfully install phpIPAM on ubuntu. Tap the Proceed to login button to go to your phpIPAM installation’s landing page and sign-in with the administrator username and secret word you entered in the Admin password section. phpIPAM Installation and setup are presently complete, so you can start adding data to deal with the systems you screen all the more effortlessly.