How To Install PHPIPAM On CentOS 7 RHEL 7 - Tech Space KH
How To Install PHPIPAM On CentOS 7 RHEL 7 - Tech Space KH
1. Overview
PHPIPAM is one of the top open-source IP address management system, IPAM. It provides light, modern and useful IP address
management. It is php-based application with MySQL database backend, but in this article will use MariaDB instead. Some interesting
of PHPIPAM features are IPv4/IPv6 address management, Active Directory(AD)/apenLDAP authentication, multiple level of nested
subnets, VLAN management, Email notification, IP request function, and rack management.
AdChoices
2. Prerequisites
a. You have already install RHEL/CentOS 7 Linux server up and running. In case that you don’t, you would probably like to read
this link. Minimal RHEL/CentOS 7 Installation With Logical Volume Manager (LVM).
b. You have already done the initial server setup. Please refer to this link Minimal RHEL/CentOS 7 Initial Server Setup.
In CentOS 7, MySQl is moved to MariaDB, execute the following command to install MariaDB.
Enable MariaDB service to start it a the system boot and start its service.
Now let do the security hardening of MariaDB by execute the following command.
# mysql_secure_installation
We need to create a database and a user for Cacti application and grant it all database privileges.
# mysql -u root -p
mysql> create database phpipamdb01;
mysql> grant all on phpipamdb01.* to phpipamuser01@localhost identified by 'P@ssword01';
To install PHPIPAM IP network management, we need to install some mandatory packages as the following first.
# yum -y install httpd php php-cli php-gd php-common php-ldap php-pdo php-pear php-snmp php-xml php-mysql
We need to set correct locales to be used on server, they are required also for translations. Add following to file /etc/environment for
en_US coding.
# vim /etc/environment
LC_ALL=en_US.utf-8
LANG=en_US.utf-8
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 2/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
Enable Apache service to start it a the system boot and start its service.
Now let move to the installation directory for PHPIPAM IP address management system, /var/www, and download it.
# cd /var/www
# git clone https://github.com/phpipam/phpipam.git
It is recommended to create a symbolic link to the extracted directory of PHPIPAM IP address management system. So, it will make us
easy to upgrades PHPIPAM application to a newer versions latter.
# cd /var/www/
# mv phpipam phpipam.1.3
# ln -s phpipam.1.3 phpipam
Also, we need to make sure that the permissions on the PHPIPAM IP management system root directories are set correctly as the
following.
# vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
# systemctl restart iptables
# iptables -L -n -v
Usually, the default PHP installation usually has not configured the correct timezone or php error reporting.
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 3/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
AdChoices
# vim /etc/php.ini
date.timezone = Asia/Phnom_Penh
log_errors = syslog
# cp /var/www/phpipam.1.3/config.dist.php /var/www/phpipam.1.3/config.php
# vim /var/www/phpipam.1.3/config.php
$db['host'] = 'localhost';
$db['user'] = 'phpipamuser01';
$db['pass'] = 'P@ssword01';
$db['name'] = 'phpipamudb01';
$db['port'] = 3306;
Now we need to import SCHEMA.sql file into the created database with following command.
# cd /var/www/phpipam.1.3
# mysql -u root -p phpipamdb01 < db/SCHEMA.sql
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 4/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
# vim /etc/selinux/config
SELINUX=disabled
# reboot
To create a VHost for PHPIPAM ip address management system, create a *.conf file in directory /etc/httpd/conf.d as the following.
# vim /etc/httpd/conf.d/phpipam.conf
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName ipam.techspacekh.com
DocumentRoot /var/www/phpipam
ErrorLog "/var/log/httpd/phpipam.techspacekh.com.log"
CustomLog "/var/log/httpd/phpipam.techspacekh.com.log" combined
</VirtualHost>
Finally, PHPIPAM IP address management system is installed. In your browser, in the address box type in http://ipam.techspacekh.com
and the following windows appears.
Login using default account admin/ipamadmin. It will force your to the admin password after successfully login at the first time.
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 5/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 6/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
Users also can use this IP address management system to request for an IP address.
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 7/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
There is also an email notification when some body make any change or updated any thing.
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 8/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
It is also possible if you wish to integrate PHPIPAM ip address management system with Google Map by using Google Map API. So,
you can see the location of your branches exactly in Google Map.
First we need to create a Google Maps API key. Go to https://console.developers.google.com and login using your Gmail account and
then go to Google Maps APIs section and click on “Google Maps JavaScript API”
Then, you need to create a project to get an API key and make sure that it is enabled.
After that, go to Credentials tab and copy the API key you created to past on file config.php of PHPIPAM.
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 9/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
Open file “/var/www/phpipam/config.php” with your favorite text editor and past the Google Maps API key that you copied from above
step as the following.
# vim /var/www/phpipam/config.php
$gmaps_api_key = "AIzaSyDl6RFZZZZZ_MM_KKKKKK_YVxJo2i4lg";
Now you should be able to see your branch location appears in Google Maps of PHPIPAM as the following.
7. Conclusion
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 10/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
That’s all about installing PHPIAM for web based IP address management system on RHEL/CentOS 7 from Tech Space KH. Hopefully,
you can find this guide informative and helpful for IP management tool. If you have any questions or suggestions you can always leave
your comments below. I will try all of my best to review and reply them.
Comments
0 comments
Add a comment...
Related Posts:
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 11/12
1/25/2018 How to Install PHPIPAM on CentOS 7 RHEL 7 | Tech Space KH
http://www.techspacekh.com/installing-phpipam-for-ip-address-management-system-on-rhelcentos-7/ 12/12