How to install phpipam IP address management application on Ubuntu Server 24
phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. It is php-based application with MySQL database backend, using jQuery libraries, ajax and HTML5/CSS3 features. For more information and technical documentation visit https://phpipam.net/
Prerequisites
Before you begin, ensure you have:
- An Ubuntu Server 2024 installation.
- Sudo privileges to execute administrative commands.
- A static IP address configured on your server for consistent network visibility.
Step 1: Update Software Repositories
# apt update
Step 2: Install Available Software Updates
# apt upgrade -y
Step 3: Install Prerequisites
# apt install curl wget zip git -y
Step 4: Install Apache HTTPD and MySQL
# apt install apache2 mariadb-server mariadb-client -y
Step 5: Install PHP Components
# apt install php php-curl php-common php-gmp php-mbstring php-gd php-xml php-mysql php-ldap php-pear -y
Step 6: Configure the MySQL Database and Secure Your Database
Run the security script to set root password and secure your MySQL installation:
# mysql_secure_installation
Step 7: Login to the MySQL Database as the Root User
# mysql -u root -p
Step 8: Create a Database for phpIPAM
Execute the following SQL commands to create a new database and user for phpIPAM:
SQL
> CREATE DATABASE ipam_db;
> GRANT ALL PRIVILEGES ON ipam_db.* TO 'ipam_user'@'localhost' IDENTIFIED BY 'ipam_pass';
> FLUSH PRIVILEGES;
> EXIT;
Exit to the terminal.
Note: Replace ipam_db, ipam_user, and ipam_password with your preferred database name, username, and password.
Step 9: Download phpIPAM Source Code from GitHub
# git clone https://github.com/phpipam/phpipam.git /var/www/html/phpipam
Note: If the download stops with error fatal: fetch-pack: invalid index-pack output, try the following solutions: (Skip this if the download process finished successfully)
Increase the Git Buffer Size
# git config --global http.postBuffer 157286400
Clone Using HTTP/1.1
# git config --global http.version HTTP/1.1
Clone in Parts
# git clone --depth 1 https://github.com/phpipam/phpipam.git /var/www/html/phpipam
# cd /var/www/html/phpipam
# git fetch --unshallow
Step 10: Navigate to the Directory and Checkout the Latest Release
# cd /var/www/html/phpipam
# git checkout $(git tag --sort=v:refname | tail -n1)
Step 11: Set the Owner of the phpIPAM Directory
# chown -R www-data:www-data /var/www/html/phpipam
Step 12: Copy Sample Config File
# cp /var/www/html/phpipam/config.dist.php /var/www/html/phpipam/config.php
Step 13: Edit Config.php and Change the Values
# nano /var/www/html/phpipam/config.php
Inside the config.php file, update the database connection details:
PHP
$db['host'] = '127.0.0.1'; $db['user'] = 'ipam_user'; $db['pass'] = 'ipam_pass'; $db['name'] = 'ipam_db'; $db['port'] = 3306;
Bellow the database connection, add the following line.
define('BASE', "/phpipam/");
Note: The values for user, pass, and name must be the same as those set during the database configuration.
Step 14: Enable mod_rewrite
# a2enmod rewrite
Step 15: Restart the Apache Service
# systemctl restart apache2
Step 16: Complete the Installation via Web Browser
- Navigate to http://<phpipam_IP_or_FQDN>/phpipam in your web browser.
- Click on New phpIPAM installation.
- Uncheck the Create new database and Set permission to tables.
- Proceed with Automatic Database Installation using the ipam_db credentials set earlier.
- Configure the admin login password and finish the installation.
Note: If you want to make server automatically discover nodes after configuration in defined subnets, add the lines bellow to /etc/crontab using nano or any text editor, then run the command to reload crontab service.
*/10 * * * * root /usr/bin/php /var/www/html/phpipam/functions/scripts/pingCheck.php */10 * * * * root /usr/bin/php /var/www/html/phpipam/functions/scripts/discoveryCheck.php */10 * * * * root /usr/bin/php /var/www/html/phpipam/functions/scripts/resolveIPaddresses.php
Save the file and exit. Run the bellow command to reload cron service
# service cron reload
Note: 10 represents minutes and you can change it to your custom value.
My brother suggested I might like this blog. He was totally right. This post actually made my day. You can not imagine simply how much time I had spent for this info! Thanks!
Dear Milagros Kaiser
Thank you so much for your kind words! I’m thrilled to hear that you found the information on my blog helpful and that it made your day. It’s messages like yours that inspire me to keep sharing my knowledge and experiences.
I’m also grateful to your brother for recommending my blog. If there’s any other topic you’re interested in or if you have any questions, please feel free to reach out. Your feedback is invaluable.
Warm regards, Fardad
I appreciate, cause I found just what I was looking for. You have ended my 4 day long hunt! God Bless you man. Have a nice day. Bye
You are welcome…
preman69 preman69 preman69 preman69 preman69
Excellent post. I was checking continuously this blog and I’m impressed!
Very useful information specifically the last part :
) I care for such info much. I was looking for this particular info for a
long time. Thank you and good luck.
Thank you so much for your kind words! I’m glad you found the information useful
jpslot jpslot jpslot jpslot jpslot
Heya! I understand this is somewhat off-topic but
I needed to ask. Does building a well-established website like yours
require a lot of work? I am completely new to writing a blog however I do write in my journal everyday.
I’d like to start a blog so I can easily share my own experience and thoughts online.
Please let me know if you have any kind of ideas or tips for new aspiring blog owners.
Thankyou!
I worked hard to make this blog. It took approximately 1 month to lunch. you can get help from WordPress thems.good luck
protogel protogel protogel protogel protogel
protogel protogel
What’s up, I read your new stuff daily. Your writing style is witty, keep doing what you’re doing!
rafi777 rafi777 rafi777
This is really attention-grabbing, You are a very professional blogger.
I have joined your feed and look ahead to looking for extra of your great post.
Additionally, I have shared your web site in my social networks
I’m still learning from you, but I’m trying to achieve my goals. I absolutely love reading all that is written on your website.Keep the aarticles coming. I enjoyed it!
I just like the helpful information you provide to your articles.
I’ll bookmark your weblog and test again here frequently.
I’m slightly sure I will be told a lot of new stuff right here!
Good luck for the following!
If some one wants expert view on the topic of blogging then i suggest him/her to
go to see this weblog, Keep up the nice work.
This website certainly has all the information I wanted about this subject and didn’t know who to ask.
I know this website presents quality depending articles or reviews and extra stuff, is there any other
web site which provides these data in quality?
Thanks for your help and for writing this post. It’s been great.
Thank you for providing me with these article examples. May I ask you a question?
Sure
Hey very nice site!! Man .. Excellent .. Amazing .. I’ll bookmark your site and take the feeds also…I’m happy to find so many useful information here in the post, we need work out more techniques in this regard, thanks for sharing. . . . . .
Please provide me with more details on the topic