Here you’ll learn to install RackTables on Ubuntu 18.04 / Ubuntu 16.04 LTS Linux system. Racktables is a robust and nifty tool designed to help you manage your datacenter and server room assets. RackTables allows you to manage document hardware assets, network addresses, space in racks, networks configuration and much much more. Earlier on in the series we covered:

How to Install NetBox on CentOS 7 with Apache and Supervisord

Install and Configure phpIPAM on Ubuntu 18.04

Install Netbox Ubuntu 18.04 LTS

RackTables Requirements

RackTables requires:

  1. A web-server – Apache or Nginx
  2. PHP 5.5.0 or newer) for front-end
  3. MySQL/MariaDB database server for the back-end data.

We will install these required packages before setting up RackTables on our Ubuntu server. For Database, we’ll use MariaDB, for Web server we’ll use Nginx.

Step 1: Install PHP

Ubuntu 18.04 has PHP 7.2 in its repositories, and  PHP 7.0 Ubuntu 16.04 LTS. Install Ubuntu and required extensions on any of the systems using the commands:

sudo apt-get install php php-cli php-snmp php-gd php-mysql php-mbstring php-bcmath php-json

Step 2: Install MariaDB Database server

To install MariaDB on Ubuntu 18.04 and Ubuntu 16.04 servers, follow our guides below:

Install MariaDB 10.x on Ubuntu 18.04 and CentOS 7

How to install MariaDB 10.3 on Ubuntu 16.04 (Xenial Xerus) LTS

Once you have MariaDB database server installed, create a database and user for RackTables

CREATE DATABASE racktables CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES on racktables.* TO 'racktables'@'localhost' IDENTIFIED BY "StrongPassword";

Step 3: Install Nginx and php-fpm

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features. In this section, we’ll install nginx web server and php-fpm.

sudo apt install -y nginx php-fpm

Create Nginx configuration file for RackTables

 server {
        listen 80;

        root /srv/racktables/wwwroot;

        location / {
            index index.php;

        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/run/php/php7.2-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi_params;

You’ll need to replace /srv/racktables with your Racktables root folder. For Ubuntu 16.04, your fastcgi_pass will point to /run/php/php7.0-fpm.sock

Check to confirm that the configuration file is okay

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If all seem ok, restart nginx

sudo systemctl restart nginx
sudo systemctl enable nginx

Step 4: Download and install Racktables

We’ll download RackTables to the /srvdirectory

cd /srv

Clone racktables source code from Github

$ git clone
Cloning into 'racktables'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 32365 (delta 17), reused 24 (delta 13), pack-reused 32327
Receiving objects: 100% (32365/32365), 25.60 MiB | 625.00 KiB/s, done.
Resolving deltas: 100% (20639/20639), done.

Set directory ownership

sudo chown -R www-data:www-data /srv/racktables

Start the installation by opening the link follow the instructions.

instal racktables ubuntu 18.04 01 min

On step one, check proceed. It will do system checks, if all are Green, proceed to step 3

Create secret.php and set permissions when prompted.

sudo touch '/srv/racktables/wwwroot/inc/secret.php'
sudo chmod a=rw '/srv/racktables/wwwroot/inc/secret.php'

Next, configure database

instal racktables ubuntu 18.04 database min
UNIX socket: /var/run/mysqld/mysqld.sock
database: racktables
username: racktables
username: StrongPassword

Reset permission of /srv/racktables/wwwroot/inc/secret.php

sudo chown www-data:nogroup /srv/racktables/wwwroot/inc/secret.php
chmod 440 /srv/racktables/wwwroot/inc/secret.php

Enable execution of stored functions.

SET GLOBAL log_bin_trust_function_creators=1;

On step 6, create admin user password.

instal racktables ubuntu 18.04 set admin password min

Congratulations! RackTables installation is complete. After pressing Proceed you will enter the system. Authenticate with admin username.

instal racktables ubuntu 18.04 UI min

You have successfully installed RackTables on Ubuntu 18.04 LTS Linux system.


Install Netbox on Ubuntu 18.04

Install Netbox CentOS 7

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here