Install phpIPAM on Ubuntu
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.
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.
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 xyz.com directing to your public IP address.
You need to add an A record with www.xyz.com 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.
1st Step - Configuring Apache
As a matter of course, phpIPAM depends on query strings in its URL structure to pass information starting with one a player in the application then onto the next. Query strings are annexed to a URL with a? as well include at least one field-value sets isolated by &.
In spite of the fact that not completely needed for installation, phpIPAM bolsters URL-rewriting by method for Apache’s mod_rewrite module, which makes an interpretation of inquiry strings into more lucid and human-accommodating URLs.
On the off chance that you didn't officially empower mod_rewrite in the safe your Apache installation with a TLS/SSL certificate requirement by diverting all HTTP requests to HTTPS, utilize Apache's a2enmod utility now to empower mod_rewrite so you can turn URL-revamping on in 2nd 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 off chance that mod_rewrite as of now was empowered, the output will read:
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.
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 mo_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 your made for phpIPAM in the Prerequisites.
sudo nano /etc/apache2/sites-available/xyz.com-le-ssl.conf
Put the below mentioned lines into the configuration file:
Require all granted
Now save and close the file to make a start.
Presently, test the setup changes before restarting Apache web server.
sudo apache2ctl configtest
On the off chance that the output says Syntax OK, you're prepared to proceed onward. Or else, review the previous guidelines and take after the on-screen messages for more details.
At last, restart Apache server to enable mod_rewrite and enact the new set up.
sudo systemctl restart apache2
Since you have not installed phpIPAM yet, there is nothing to check at https://xyz.xom. So let us download and install it now.
2nd Step - 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..
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 https://github.com/phpipam/phpipam.git /var/www/xyz.com/public_html
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/xyz.com/public_html ...
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.
3rd Step - 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/xyz.com/public_html
$ 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.
* 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.
4th Step- Creating the Database &Database User
Explore your browser to https://xyz.com/install. 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.
On this step, 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 plaintext documents you give.
Manual database installation: The wizard will supply you with the default SQL charges you have to make another phpIPAM database physically.
For straightforwardness' purpose, pick the completely computerized alternative by tapping on the Automatic database installation 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.