0% found this document useful (0 votes)
108 views3 pages

PhpIPAM Installation Guide

This document outlines the steps to install and configure phpIPAM on a server, including updating system packages, installing MySQL, Apache2, and PHP with required extensions. It details the creation of a MySQL database and user for phpIPAM, importing the database schema, setting file permissions, and configuring Apache for phpIPAM access. Finally, it instructs on enabling mod_rewrite and accessing phpIPAM through a web browser using default credentials.

Uploaded by

Foren Mier
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views3 pages

PhpIPAM Installation Guide

This document outlines the steps to install and configure phpIPAM on a server, including updating system packages, installing MySQL, Apache2, and PHP with required extensions. It details the creation of a MySQL database and user for phpIPAM, importing the database schema, setting file permissions, and configuring Apache for phpIPAM access. Finally, it instructs on enabling mod_rewrite and accessing phpIPAM through a web browser using default credentials.

Uploaded by

Foren Mier
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

# Update system packages

apt-get update

# Step 1: Install MySQL (or MariaDB), Apache2, and Git

apt-get install mysql-server apache2 git wget -y

# Step 2: Install PHP and required extensions

apt-get install php libapache2-mod-php php-curl php-mysql php-gd php-intl php-pear php-imap php-
memcache php-pspell php-tidy php-xmlrpc php-mbstring php-gmp php-json php-xml -y

# Step 3: Enable and start Apache2 and MySQL services

systemctl start apache2

systemctl start mysql

systemctl enable apache2

systemctl enable mysql

# Step 4: Secure MySQL installation

mysql_secure_installation

#Choose the options accordingly

# Step 5: Create MySQL database and user for phpIPAM

mysql -u root -p

CREATE DATABASE phpipamdb;

CREATE USER 'phpipam'@'localhost' IDENTIFIED BY 'Ccie-65745';

GRANT ALL PRIVILEGES ON phpipamdb.* TO 'phpipam'@'localhost';

FLUSH PRIVILEGES;

EXIT;

# Step 6: Install phpIPAM from Git repository

git clone --recursive https://github.com/phpipam/phpipam.git /var/www/html/phpipam

Binary Avenue Academy


# Step 7: Configure phpIPAM database connection

cd /var/www/html/phpipam

cp config.dist.php config.php

# Update the configuration file for DB connection

nano config.php

$db['host'] = 'localhost';

$db['user'] = 'phpipam';

$db['pass'] = 'Ccie-65745';

$db['name'] = 'phpipamdb';

$db['port'] = 3306;

# Step 8: Import phpIPAM database schema into MySQL

mysql -u root -p phpipamdb < db/SCHEMA.sql

# Step 9: Set proper file permissions for phpIPAM

chown -R www-data:www-data /var/www/html/phpipam

chmod -R 755 /var/www/html/phpipam

# Step 10: Configure Apache for phpIPAM

nano /etc/apache2/sites-available/000-default.conf

# Update the Apache virtual host file (manual step in the script)

# Comment these lines:

#ServerAdmin webmaster@localhost

#DocumentRoot /var/www/html

#ErrorLog ${APACHE_LOG_DIR}/error.log

#CustomLog ${APACHE_LOG_DIR}/access.log combined

# Replace with the following:

Binary Avenue Academy


ServerAdmin [email protected]

DocumentRoot "/var/www/html/phpipam"

ServerName example.com

<Directory "/var/www/html/phpipam">

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

</Directory>

ErrorLog "/var/log/phpipam-error_log"

CustomLog "/var/log/phpipam-access_log" combined

# Step 11: Enable Apache mod_rewrite and restart Apache

a2enmod rewrite

systemctl restart apache2

# Step 12: Access phpIPAM via browser

http://localhost

Default credentials: admin / ipamadmin

Binary Avenue Academy

You might also like