Here you’ll learn to install RackTables on Ubuntu 22.04|20.04|18.04|16.04 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:

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 and required extensions

Install Ubuntu and required extensions on any of the systems using the commands:

sudo apt update
sudo apt install php php-cli php-snmp php-gd php-mysql php-mbstring php-bcmath php-json php-fpm php-ldap php-curl

Once PHP is installed proceed to the next steps.

Step 2: Install MariaDB Database server

Start with the installation of MariaDB database server:

sudo apt install mariadb-server mariadb-client

Ensure mariadb service is started and set to start at boot:

sudo systemctl enable mariadb && sudo systemctl start mariadb

Secure database server by setting root password:

sudo mysql_secure_installation

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

$ sudo mysql -u root -p
CREATE DATABASE racktables CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER racktables@localhost IDENTIFIED BY "StrongPassword";
GRANT ALL PRIVILEGES ON racktables.* TO racktables@localhost;
FLUSH PRIVILEGES;
QUIT;

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 remove apache2
sudo apt install -y nginx php-fpm

Create Nginx configuration file for RackTables

sudo vim /etc/nginx/conf.d/racktables.conf

Paste and modify the data below:

server {
        listen 80;
        server_name racktables.example.com;

        root /var/www/racktables/wwwroot;

        location / {
            index index.php;
        }

        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_pass unix:/run/php/php-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 /var/www/racktables with your Racktables root folder.

Check to confirm that the configuration file is okay

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

Step 4: Download and install Racktables

We’ll download RackTables to the /var/wwwdirectory:

cd /var/www

Clone racktables source code from Github

$ sudo git clone https://github.com/RackTables/racktables.git
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 /var/www/racktables

Restart nginx service:

sudo systemctl restart nginx
sudo systemctl enable nginx

Start the installation by opening the link

http://racktables.example.com/?module=installer

then follow the installation 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 '/var/www/racktables/wwwroot/inc/secret.php'
sudo chmod a=rw '/var/www/racktables/wwwroot/inc/secret.php'

Next, configure database

instal racktables ubuntu 18.04 database min
database: racktables
username: racktables
username: StrongPassword

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

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

Enable execution of stored functions.

$ sudo mysql -u root -p
SET GLOBAL log_bin_trust_function_creators=1;
\q

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 22.04|20.04|18.04|16.04 Linux system.

Similar:

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here