Installing phpIPAM

phpIPAM – web application for IP accounting, VLAN addresses, etc. Works on PHP using MySQL, jQuery, ajax and HTML5.

On the test I will install phpIPAM in Ubuntu Server 14.04.

First of all, we will update the sources and install the necessary components:

sudo apt-get update
sudo apt-get install apache2 mysql-server php5 php5-gmp php-pear php5-mysql php5-ldap

Let’s see what is the newest version on the official website https://phpipam.net/download/ and copy the link to it.

Let’s go to the web server directory, download the phpIPAM archive from the previously copied link and unpack it:

cd /var/www/
sudo wget http://freefr.dl.sourceforge.net/project/phpipam/phpipam-1.3.tar
sudo tar -xvf phpipam-1.3.tar
sudo rm phpipam-1.3.tar
cd phpipam

Create a MySQL database and a user with full rights to it:

mysql -u root -p
CREATE DATABASE phpipam;
GRANT ALL PRIVILEGES ON phpipam.* TO phpipam@localhost IDENTIFIED BY 'PASSWORD';
flush privileges;
exit

Rename the standard configuration file and open it in a text editor, for example nano (CTRL+X to exit, y/n to save or cancel changes):

sudo mv config.dist.php config.php
sudo nano config.php

Let’s write the parameters of connection to the database:

$db['host'] = "localhost";
$db['user'] = "phpipam";
$db['pass'] = "password";
$db['name'] = "phpipam";

If phpIPAM is not in the root directory of the web server, then we also specify the path:

define('BASE', "/phpipam/");

In the web server settings for the directory with phpIPAM, we specify Options FollowSymLinks and AllowOverride all:

sudo nano /etc/apache2/sites-enabled/000-default

Activate the rewrite module and restart apache2 to apply the changes:

sudo a2enmod rewrite
sudo service apache2 restart

To complete the installation, open the link in the browser http://server/phpipam/ click on install and answer the questions.

Leave a Reply