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.
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
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 https://downloads.sourceforge.net/project/racktables/RackTables-0.19.6.tar.gz
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');
*** 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.
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.
append to end of file.
function stringForOption ($string, $maxlen = 50)
if (width < 150)
width = 400;