Step-by-Step Guide to Installing phpIPAM on Linux: From Apache to MariaDB
This article provides a comprehensive, step‑by‑step tutorial for installing and configuring the phpIPAM IP address management web application on a Linux server, covering environment preparation, disabling SELinux, installing dependencies, setting up Apache and MariaDB, cloning the source, adjusting permissions, and completing the web‑based setup.
1. Set up system environment and install dependencies
Disable SELinux and reboot:
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config && rebootStop firewall: systemctl stop firewalld Install required packages:
yum install epel-release -y
yum install wget vim net-tools httpd mariadb-server php php-cli php-gd php-common php-ldap php-pdo php-pear php-snmp php-xml php-mysql php-mbstring git -y2. Configure and run Apache
Modify /etc/httpd/conf/httpd.conf to set the server name and enable URL rewriting:
ServerName localhost:80
<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>Check the configuration: httpd -t -f /etc/httpd/conf/httpd.conf Set the timezone in /etc/php.ini: date.timezone = Asia/Shanghai Enable Apache to start on boot and start it now:
systemctl enable httpd
systemctl start httpd3. Initialize MariaDB
Start and enable the MariaDB service:
systemctl start mariadb
systemctl enable mariadbSecure the installation:
mysql_secure_installation4. Download and configure phpIPAM
Clone the phpIPAM repository into the web root and checkout version 1.4:
cd /var/www/html
git clone https://github.com/phpipam/phpipam.git .
git checkout 1.4Set correct ownership for the web files: chown apache:apache -R /var/www/html Copy the default configuration file and edit the base path:
cp config.dist.php config.php
define('BASE', "/phpipam");Restart Apache to apply the changes:
systemctl restart httpd5. Configure phpIPAM via the web interface
Open http://<em>server_ip</em>/phpipam in a browser, choose a new installation, provide the MariaDB credentials, create the phpIPAM database, and complete the initial setup wizard.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
