How to Install OpenDCIM on CentOS 7

Data center infrastructure management (DCIM) is a growing challenge for data center managers, and a hot market for software vendors. The openDCIM project offers an open source alternative for companies seeking to improve their asset tracking and capacity planning. OpenDCIM is used for managing the infrastructure of a data center, no matter how small or large. DCIM means many different things to many different people, and there is a multitude of commercial applications available but openDCIM does not contend to be a function by function replacement for commercial applications. It was Initially developed in-house at Vanderbilt University Information Technology Services by Scott Milliken. The software is released under the GPL v3 license that is free to modify it, and share it with others, as long as you acknowledge where it came from.

The main goal for openDCIM is to eliminate the excuse for anybody to ever track their data center inventory using a spreadsheet or word processing document again. It provide complete physical inventory of the data center.

Features of OpenDCIM:

Following are some of its other useful features of OpenDCIM.

  • Support for Multiple Rooms (Data Centers)
  • Computation of Center of Gravity for each cabinet
  • Template management for devices, with ability to override per device
  • Optional tracking of cable connections within each cabinet, and for each switch device
  • Archival functions for equipment sent to salvage/disposal
  • Management of the three key elements of capacity management - space, power, and cooling
  • Basic contact management and integration into existing business directory via UserID
  • Fault Tolerance Tracking - run a power outage simulation to see what would be affected as each source goes down


In order to install OpenDCIM on CentOS 7, we need to compete the following requirements on our server.

  • Web host running Apache 2.x (or higher) with an SSL Enabled site
  • MySQL 5.x (or higher) database
  • PHP 5.x (or higher)
  • User Authentication
  • Web Based Client

Installing Apache, PHP, MySQL

Our first step is to make sure that the complete LAMP stack has been properly configured with Apache/PHP and MySQL/MariaDB running.

To do let's run the following command on your CentOS 7 server to install Apache, PHP with few of its required modules and MySQL-MariaDB server.

# yum install httpd php php-mysql php-mbstring mariadb-server

After resolving dependencies the following number of shown packages will be installed on your system after you type 'y' and hit Enter key.

LAMP packages

Start and Enable Apache/MySQL services:

Once the packages are installed then using the following commands start and enable the services of Apache and Mysql server and check their status that should be active and running.

# systemctl enable httpd.service
# systemctl start httpd.service

# systemctl enable mariadb.service
# systemctl start mariadb.service

starting services

Create database for openDCIM

Before creating the database for OpenDCIM, Secure your MySQL/MariaDB server by doing the following tasks after running the command as shown.

# mysql_secure_installation

  • Set a root password
  • Remove anonymous users
  • Disallow root login remotely
  • Remove test database and access to it
  • Reload privilege tables

securing MysQL

Now create a database for openDCIM after conecting to the MariaDB.

# mysql -u root -p

MariaDB [(none)]> create database dcim;
MariaDB [(none)]> grant all privileges on dcim.* to 'dcim' identified by 'password';
MariaDB [(none)]> exit

OpenDCIM database

Enable HTTPS

Run the command below to install 'mod_ssl' package on your CentOS 7 server

# yum -y install mod_ssl

Once the package installed, generate the necessary keys and copy them to the proper directories using below commands.

# cd /root

# openssl genrsa -out ca.key 1024

# openssl req -new -key ca.key -out ca.csr

# openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

# cp ca.crt /etc/pki/tls/certs

# cp ca.key /etc/pki/tls/private/ca.key

# cp ca.csr /etc/pki/tls/private/ca.csr

Enabling https

Setup Server Name:

To set the server name of your server open the default web configuration in your editor by searching the 'ServerName' in it and add the following line.

# vim +/ServerName /etc/httpd/conf/httpd.conf

ServerName opendcim_server_name:443

Save and close the configuration file using ':wq!' and then restart apache web services.

# systemctl restart httpd.service

New Virual Host for OpenDCIM:

Create a new configuration file for the openDCIM VirtualHost and put the following configuration in it.

# vim /etc/httpd/conf.d/opendcim_server_name.conf

SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
DocumentRoot /opt/openDCIM/opendcim

AllowOverride All
AuthType Basic
AuthName "openDCIM"
AuthUserFile /opt/openDCIM/opendcim/.htpasswd
Require valid-user

After save and closing the file now we need to enable basic user authentication to protect the openDCIM web directory by configuring the files we mentioned in above configuration file.

Let's run below commands to create a user after create a new file as shown.

# mkdir -p /opt/openDCIM/opendcim

# touch /opt/openDCIM/opendcim/.htpasswd

# htpasswd /opt/openDCIM/opendcim/.htpasswd Administrator

Let's open Web Access on firewall as on CentOS 7 FirewallD is enabled by default, and blocks access to HTTPS port on 443.

# firewall-cmd --zone=public --add-port=443/tcp --permanent

# firewall-cmd --reload

opendcim user setup

Download and Install openDCIM

After finishing the configuration of the server, now we need to download the openDCIM package from their Office Web Page.

OpenDCIM Download

Use below commands to get the package on your server.

# cd /opt/openDCIM/

# curl -O

Extract the archive and create a symbolic link by flowing below commands.

# tar zxf openDCIM-4.2.tar.gz

# ln -s openDCIM-4.2-release opendcim

You can also rename the directory openDCIM-4.2-release to 'opendcim' in case if you don't want to create the symbolic link.

Configuring OpenDCIM:

Now, prepare the configuration file for access to the database we have created earlier.

# cd /opt/openDCIM/opendcim

# cp

# vim

$dbhost = 'localhost';
$dbname = 'dcim';
$dbuser = 'dcim';
$dbpass = 'dcimpassword';

# systemctl restart httpd.service

Access OpenDCIM Web Portal:

Now open openDCIM in your browser to proceed with the web based installation.


You will be asked for authentication and after proving the user name and Password you will be directed to OpenDCIM web page where you will be asked to create new Department as shown.

OpenDCIM Web

After completing these parameters, switch to the Data Center and give your new Data Center details.

OpenDCIM Data center

Once you have created an Data center then you will be able to create its cabinet inventory.

OpenDCIM Cabinet

You have done, and finished the basic configurations of OpenDCIM .

OpenDCIM installed


Thank you for being with us, we have successfully setup OpenDCIM on our CentOS 7 server. Now you can easily manage your Data centers no matter how small or large environment you have. Do share your experience and leave your valuable comments.


Share This :

Free Linux Ebook to Download

Comments (1)

Trackback URL | Comments RSS Feed

  1. Juan says:

    I am following your guide but when I am trying to login into the opendcim
    the program does not recognize my credentials.
    Do you have any Idea?

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.