Monday, April 11, 2016

RackTables Install and Fix Guide

If you've ever had to document a data centre rack layout, you would be aware how challenging this task can be.

Trying to attach information such as cable details, serial numbers, asset details, neighbouring devices and ports.

The list goes on!

Luckily, RackTables comes to the rescue.

Racktables is a PHP / MySQL (with a bit of javascript) platform for easier data centre physical documentation.

Install Guide 

This guide is written for CentOS 7 (my go to Linux distro these days).

Firstly, install the good old LAMP stack.

The guide I use most often for this is located at (although my steps below cover this as well):

In case this link ever dies, here's a PDF version

yum install httpd
systemctl start httpd.service
systemctl disable firewalld
systemctl stop firewalld
systemctl enable httpd.service

yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation

enter blank for root pass
yes for create pass
set new pass
enter for everything else

systemctl enable mariadb.service
systemctl restart httpd.service

yum install php-mbstring php-bcmath php-snmp php-gd php-ldap

wget wget --no-check-certificate

Note - get the link to the latest stable version that you can paste straight into the shell by using the "get direct link" option when downloading RackTables from SourceForge.

tar -xvzf RackTables-0.19.6.tar.gz
cp -r RackTables-0.19.6/wwwroot /var/www/html/racktables

mysql -uroot -p

create database racktables;
grant all on racktables.* to root;
grant all on racktables.* to root@localhost;
grant all on racktables.* to rackuser;
grant all on racktables.* to rackuser@localhost;
set password for rackuser@localhost=password('rackpw');

setenforce 0

*** Used to find Apache process owner and group ***

sudo egrep -iw --color=auto 'user|group' /etc/httpd/conf/httpd.conf

Note - you will need to change the permissions as per below on secret.php as prompted during the installer.

cd /var/www/html/racktables/inc/
sudo chown apache:apache secret.php
sudo chmod 400 secret.php



So you've got RackTables up and running.

Now, if you happen to have long hostnames for the infrastructure devices in your environment, you will immediately notice the text fields in RackTables are too short in the device link and reserve port areas of the interface.

To fix:

nano /var/www/html/racktables/css/pi.css

append to end of file.

#remote_port {
        width: 800px;

nano /var/www/html/racktables/inc/interface-lib.php

function stringForOption ($string, $maxlen = 50)

nano /var/www/html/racktables/js/inplace-edit.js

 if (width < 150)
                width = 400;

No comments:

Post a Comment