openDCIM 3 Install on Ubuntu 14.04

What is openDCIM

openDCIM is a free web based Data Center Infrastructure Management application. DCIM means many different things to many different people, and there is a multitude of commercial applications available.

The number one 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.


Install Apache, php, mysql

Thanks to apt, This step is incredibly easy.

sudo apt-get install apache2 php5 mysql-server

Please choose a fast source server for yourself, or the wait time would be long.

Enable https

First we have to enable ssl.

sudo a2enmod ssl

We need to create key and certificate for user authentication. Please remind that we should put those files out of web folder to prevent downloading from browser. I simply put them in home folder.

$ cd ~
$ openssl genrsa -out ca.key 1024
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
— — -
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:NYC
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Awesome Inc
Organizational Unit Name (eg, section) []:Dept of Merriment
Common Name (e.g. server FQDN or YOUR name) []
Email Address []
$ openssl req -new -key ca.key -out ca.csr
$ openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

Set Up the Certificate

Now we have all of the required components of the finished certificate.The next thing to do is to set up the virtual hosts to display the new certificate. Open up the SSL config file:

nano /etc/apache2/sites-available/default-ssl

Within the section that begins with , quickly make the following changes. Add a line with your server name right below the Server Admin email:


Replace with your DNS approved domain name or server IP address (it should be the same as the common name on the certificate). Find the following three lines, and make sure that they match the extensions below:

SSLEngine on
SSLCertificateFile ~/apache.crt
SSLCertificateKeyFile ~/apache.key
Save and Exit out of the file.

Activate the New Virtual Host

Before the website that will come on the 443 port can be activated, we need to enable that Virtual Host:

sudo a2ensite default-ssl

You are all set. Restarting your Apache server will reload it with all of your changes in place.

sudo service apache2 reload

In your browser, type https://youraddress, and you will be able to see the new certificate.

Enable user authentication

You have protected the openDCIM web directory with a requirement for Basic authentication, with the lines already added in your Apache configuration file above.
Now, to create at least on user, do:

touch /var/www/.htpasswd
htpasswd /var/www/.htpasswd Administrator
You will be asked for a password for user “Administrator” twice.

Install opendcim

Download the latest version of openDCIM from and then put all extracted files into /var/www folder

cd /var/www/

Edit the following lines, to reflect your settings of database host (in this example localhost), database name (dcim), and credentials that you assigned when creating the database:

$dbhost = ‘localhost’;
$dbname = ‘dcim’;
$dbuser = ‘dcim’;
$dbpass = ‘dcimpassword’;

Finally, restart Apache one last time:

sudo service apache2 reload