How to Install phpIPAM on Manjaro

phpIPAM is an open-source IP address management tool that is useful for tracking and organizing IP addresses, subnets, VLANs, and more. In this tutorial, we will guide through the step-by-step installation process of phpIPAM on Manjaro.

Prerequisites

Before we start with the installation process, make sure that you have the following prerequisites:

Step 1: Install Required Packages

First, we need to ensure that all the necessary packages are installed on our system. To install them, run the following command:

sudo pacman -S apache php php-apache mariadb git

This command will install all the required packages for running phpIPAM.

Step 2: Create Database and User

Next, we need to create a database and user in the MySQL or MariaDB server. To do this, follow the below steps:

  1. Login to MySQL with the following command:
sudo mysql -u root -p
  1. Create a database named phpIPAM by running the following command:
CREATE DATABASE phpipam;
  1. Create a user named phpipamuser with a password of your choice by running the following command:
CREATE USER 'phpipamuser'@'localhost' IDENTIFIED BY 'your_password';
  1. Grant all privileges on the phpIPAM database to the phpipamuser by running the following command:
GRANT ALL PRIVILEGES ON phpipam.* TO 'phpipamuser'@'localhost';
  1. Finally, run the following command to exit MySQL:
EXIT;

Step 3: Download and Install phpIPAM

Now, we are ready to download and install phpIPAM. Follow the below commands:

  1. Clone the phpIPAM repository from Github using Git:
git clone https://github.com/phpipam/phpipam.git /var/www/html/phpipam
  1. Change the ownership of the phpipam directory to the webserver user (www-data):
sudo chown -R www-data:www-data /var/www/html/phpipam

Step 4: Configure phpIPAM

Now that we have installed phpIPAM, we need to configure it. Follow the below steps:

  1. Create a copy of the config.dist.php file and rename it config.php:
cp /var/www/html/phpipam/config.dist.php /var/www/html/phpipam/config.php
  1. Edit the config.php file and update the database details:
define('DB_HOST', 'localhost');
define('DB_NAME', 'phpipam');
define('DB_USER', 'phpipamuser');
define('DB_PASS', 'your_password');
  1. Save the config.php file and exit the text editor.

Step 5: Set Permissions

To ensure phpIPAM works correctly, we need to give the webserver (Apache) the appropriate permissions. Follow the below steps:

  1. Change the permissions of the /var/www/html/phpipam/images/ directory:
sudo chmod -R 777 /var/www/html/phpipam/images/
  1. Restart the Apache web server to apply the changes:
sudo systemctl restart httpd

Step 6: Access phpIPAM

We are done with the installation and configuration of phpIPAM. Now, we can access it through a web browser. Open your preferred web browser and enter the URL:

http://localhost/phpipam

This will open phpIPAM in your browser.

Conclusion

We have successfully installed phpIPAM on Manjaro by following the above steps. You can now start using phpIPAM to organize and manage IP addresses on your network.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!