openDCIM System Requirements
-------------------------------

The most updated instructions will always be at https://wiki.opendcim.org.   Please refer to that
website if you are not already familiar with the setup.   This file covers basics, but is not the
authoritative source.

The containerized application setup is a bit different.   Again, see the wiki.

LAMP server (Linux / Apache / MySQL / PHP)

Windows with PHP on IIS or Apache should work fine as well, but has not been tested.  If you
set up such a system, please report back on the viability and any specific configuration steps
that you had to complete before the software would work properly.

You will see the acronym DCIM throughout this documentation - this stands for Data Center
Inventory Management.


1.  Prepare the database

Create a database on the mysql server and create a separate username and password for the
software to use.  This user will need full access to the database.  For example, we will use
username "dcim" with password "dcim" on the localhost based mysql server.

From a shell prompt:

$ mysql -h localhost
mysql>  CREATE DATABASE dcim;
mysql>  GRANT ALL ON dcim.* TO 'dcim'@'localhost' IDENTIFIED BY 'dcim';

At this point you have prepped the database and are ready to configure the web site.

$ cp db.inc.php-dist to db.inc.php
$ vi db.inc.php

Fill in the blanks for user, pass, database, server.

2.  Configure Apache

It is suggested that you run openDCIM under SSL, preferably on its own IP address and server
name.  This is because the system relies upon the web server to authenticate users and pass that
information to the scripts.  Refer to the Apache (or other web server software) documentation on
how exactly to accomplish this.  It is recommended that you configure the server as

https://dcim.yourdomain.com

You can choose to either authenticate against a local password file, LDAP, or anything else
supported by your web server software.  The main thing is to authenticate users before entering
the site.

3.  Setup your file structure

Assuming that you expanded the archive into /var/www/html, you need to ensure that the apache process
owner is also the owner of the directory /var/www/html/assets and has write access, as that it where all
of the various pictures, drawings, etc will need to be stored.   If you are running multiple back
end instances behind a load balancer, this would be the one folder that should be mounted from an
NFS server or SAN.   There are some other folders that apache will need write access to for caching, but
the tar file already has the proper permissions set.   If you get errors that you can't write to a folder
that appears to be writable, the first thing to check would be SELinux.

4.  Log in to the site

Whoever logs in to the website first automatically becomes the site administrator!  This can be
changed later, but in order to work at all the system has to define at least one administrator.

Browse to the URL that you set up for your installation.  For instance:

https://dcim.yourdomain.com/

If you have set up the database permissions correctly, it will handle the installation for you.

You will have to delete the install.php file after configuration is complete in order to continue.
