Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install PHPIPAM using Docker on CentOS 7

Rumi, January 7, 2024

Update Docker Package Database. In a terminal window, type:

sudo yum check-update

Remove if any docker is preinstalled with your OS-

sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine

Install the Dependencies

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

The –y switch indicates to the yum installer to answer “yes” to any prompts that may come up. The yum-utils switch adds the yum-config-manager. Docker uses a device mapper storage driver, and the device-mapper-persistent-data and lvm2 packages are required for it to run correctly.

Add the Docker Repository to CentOS

To install the edge or test versions of Docker, you need to add the Docker CE stable repository to your system. To do so, run the command:

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

A stable release is tested more thoroughly and has a slower update cycle. On the other hand, Edge release updates are more frequent but aren’t subject to as many stability tests.

Note: If you’re only going to use the stable release, don’t enable these extra repositories. The Docker installation process defaults to the latest version of Docker unless you specify otherwise. Leaving the stable repository enabled makes sure that you aren’t accidentally updating from a stable release to an edge release.

Install Docker On CentOS Using Yum

With everything set, you can finally move on to installing Docker on CentOS 7 by running:

sudo yum install docker-ce docker-compose

The system should begin the installation. Once it finishes, it will notify you the installation is complete and which version of Docker is now running on your system.

Manage Docker Service

Although you have installed Docker on CentOS, the service is still not running. To start the service, enable it to run at startup. Run the following commands in the order listed below.

Start Docker:

sudo systemctl start docker

Enable Docker:

sudo systemctl enable docker

Check the status of the service with:

sudo systemctl status docker

Now you have a docker up and running!

phpIPAM setup using Docker Compose

Using Docker Compose, you can use the following example code to configure phpIPAM and the required MySQL container.

I’ll be putting it up at /opt

cd /opt
nano docker-compose.yml

Paste the below texts into the yml file- save and exit

version: '3'

services:
phpipam-web:
image: phpipam/phpipam-www:latest
ports:
- "80:80"
environment:
- TZ=America/Chicago
- IPAM_DATABASE_HOST=phpipam-mariadb
- IPAM_DATABASE_PASS=password
- IPAM_DATABASE_WEBHOST=%
restart: always
volumes:
- phpipam-logo:/phpipam/css/images/logo
- phpipam-ca:/usr/local/share/ca-certificates:ro
depends_on:
- phpipam-mariadb

phpipam-cron:
image: phpipam/phpipam-cron:latest
environment:
- TZ=Europe/London
- IPAM_DATABASE_HOST=phpipam-mariadb
- IPAM_DATABASE_PASS=password
- SCAN_INTERVAL=1h
restart: always
volumes:
- phpipam-ca:/usr/local/share/ca-certificates:ro
depends_on:
- phpipam-mariadb

phpipam-mariadb:
image: mariadb:latest
environment:
- MYSQL_ROOT_PASSWORD=password
restart: always
volumes:
- phpipam-db-data:/var/lib/mysql

volumes:
phpipam-db-data:
phpipam-logo:
phpipam-ca:

Replace your_root_password and your_phpipam_password with your desired passwords for the MySQL root user and the phpIPAM user, respectively.

Save this YAML code as docker-compose.yml in a directory of your choice. To spin up the containers, open a terminal, navigate to the directory containing the docker-compose.yml file, and run the following command:

docker compose up -d

This command will create and start both the MySQL and phpIPAM containers, linking them as specified in the docker-compose.yml file.

Configuring phpIPAM

Once you have deployed the phpIPAM container, you can start configuring the IP address management application through the web UI.

Setting Up the MySQL Database

Access the phpIPAM web UI and enter your connection information. Note that the MySQL database, MySQL user, and MySQL password should match the ones you used when creating the MySQL instance. Next, provide the admin user password for the phpIPAM application. Note the following screens during the web-based setup process.

Ref:
https://www.virtualizationhowto.com/2023/04/mastering-phpipam-docker-the-ultimate-setup-guide/

Administrations Application CentOSCentOS 7DockerIPAMPHPIPAM

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes