How to install RackTables on CentOS 7

To install RackTables on CentOS 7

RackTables is a data center and server room asset management system. It is a robust solution for data center/server room asset management and helps document hardware assets, network addresses, space in racks, networks configuration and much more. It can also list all the devices in the system, keeps tracks of all racks, mounts the devices into racks, maintain physical ports of devices and document the firewall. This tutorial covers the installation process of RackTables on CentOS 7.

Pre- Requisite

LAMP (Apache, PHP, MySQL)
PHP modules : php70w php70w-mysqlnd php70w-pdo php70w-gd php70w-snmp php70w-mbstring php70w-bcmath php70w-ldap
In MySQL module, create a database and a user and give privileges to user for RackTables.

Installation procedure

To proceed with the installation procedure, change the character set in MySQL server to UTF8 to enable Unicode in the MySQL server by opening the server.cnf file and make the following changes. Save and exit the file.

[root@linuxhelp Desktop]# vim /etc/my.cnf.d/server.cnf

#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
#
# See the examples of server my.cnf files in /usr/share/mysql/
#

# this is read by the standalone daemon and embedded servers
[server]

character-set-server = utf8
collation-server = utf8_general_ci
skip-character-set-client-handshake

# this is only for the mysqld standalone daemon
[mysqld]

# this is only for embedded server
[embedded]

# This group is only read by MariaDB-5.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don' t understand
[mysqld-5.5]

# These two groups are only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]

[mariadb-5.5]

Create a RackTable user by running the following command.

[root@linuxhelp Desktop]# useradd -s /sbin/nologin -c " RackTables User"  -m -d /home/racktables racktables

Download the Racktables package by executing the wget command followed by the download link.

[root@linuxhelp Desktop]# wget https://nchc.dl.sourceforge.net/project/racktables/RackTables-0.20.14.tar.gz
--2017-10-19 14:33:34--  https://nchc.dl.sourceforge.net/project/racktables/RackTables-0.20.14.tar.gz

Resolving nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)... 211.79.60.17, 2001:e10:ffff:1f02::17
Connecting to nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)|211.79.60.17|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 956477 (934K) [application/x-gzip]
Saving to: ‘ RackTables-0.20.14.tar.gz’ 

100%[======================================> ] 9,56,477     198KB/s   in 4.7s   

2017-10-19 14:33:40 (198 KB/s) - ‘ RackTables-0.20.14.tar.gz’  saved [956477/956477]

Extract the downloaded package using tar command.

[root@linuxhelp Desktop]# tar -xvzf RackTables-0.20.14.tar.gz 
RackTables-0.20.14/
RackTables-0.20.14/COPYING
RackTables-0.20.14/ChangeLog
RackTables-0.20.14/LICENSE
RackTables-0.20.14/Makefile
RackTables-0.20.14/README
RackTables-0.20.14/README.Fedora
RackTables-0.20.14/README.md
.
.
RackTables-0.20.14/wwwroot/pix/tango-view-refresh-32x32.png
RackTables-0.20.14/wwwroot/pix/unchecked.png
RackTables-0.20.14/wwwroot/pix/virtualresources.png

Copy the extracted file to HTML location by running the following command.

[root@linuxhelp Desktop]# cp -rf RackTables-0.20.14/ /var/www/html/

Change the ownership of file in HTML location.

[root@linuxhelp html]# chown -R apache.apache RackTables-0.20.14

Create the racktables.conf file under the Apache configuration directory with the following contents.

[root@linuxhelp html]# vim /etc/httpd/conf.d/racktables.conf

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
< virtualhost *:80> 
servername racktables.abc
documentroot /var/www/html/RackTables-0.20.14/wwwroot/
< Directory /var/www/html/RackTables-0.20.14/wwwroot/> 
   DirectoryIndex index.php
   Require all granted
< /Directory> 

Alias /racktables /var/www/html/RackTables-0.20.14/wwwroot/
< /virtualhost> 

Create the entry in hosts file using vim editor and enter the following contents in the file and save it.

[root@linuxhelp Desktop]# vim /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.7.240  racktables.abc

Restart the Apache service.

[root@linuxhelp html]# systemctl restart httpd

Create a secret.php file in the following location by running the following command.

[root@linuxhelp html]# touch /var/www/html/RackTables-0.20.14/wwwroot/inc/secret.php

Change the permission of secret.php file by executing the following command.

[root@linuxhelp html]# chmod 666 /var/www/html/RackTables-0.20.14/wwwroot/inc/secret.php

For installing racktables, open the browser and enter the URL as http://racktables.abc/racktables/?module=installer. The installation procedure of RackTables appears on the screen.

The list of dependencies are shown to the user and if everything is done. Click proceed option.

Enter the following details to create a database for RackTables and click retry option.

The configuration file has been done successfully. click proceed option to navigate to next page.

Next change the permission of file secret.php by executing the following command.

[root@linuxhelp html]# chmod 755 /var/www/html/RackTables-0.20.14/wwwroot/inc/secret.php

After changing the ownership and permissions of the file, the browser appears like below. click proceed option.

The created database is being initialized and click proceed option to go to next page.

Set the admin password and click retry option.

The password has been set and now to install racktables click proceed option.

To open the racktables application, click proceed option.

Enter the admin privileges in the pop-up window and click ok.

The RackTables dashboard appears on the screen.

Thus we conclude the installation procedure of RackTables on CentOS 7.

FAQ
Q
What version of PHP is recommended for Racktables?
A
Php 5.6 and above is recommended for Racktables.
Q
What is RackTable?
A
RackTables is a data center and server room asset management system. It is a robust solution for data center/server room asset management and helps document hardware assets, network addresses, space in racks, networks configuration and much more. It can also list all the devices in the system, keeps tracks of all racks, mounts the devices into racks, maintains physical ports of devices and document the firewall.
Q
what are its initial requirements of Rack table?
A
The basic requirements for Ractables are as follows,
LAMP (Apache, PHP, MySQL)
In PHP modules : php70w php70w-mysqlnd php70w-pdo php70w-gd php70w-snmp php70w-mbstring php70w-bcmath php70w-ldap
Q
Why does the SNMP sync feature return Unknown OID on Rack Table?
A
RackTables only supports some specific switch models, and yours is not one of them.
Q
Rack thumb images are broken while getting displayed?
A
A misformatted local.php extension file. For images to work correctly, every PHP file of your RackTables, which begins with tag, CAN NOT have a newline after the tag.