RackTables is an open-source data center asset management system that helps with tracking inventory, organizing equipment, and managing operations. In this tutorial, we will guide you on how to install RackTables on Manjaro.
Before installing RackTables, make sure you have the following prerequisites:
First, start by updating the Manjaro package list and upgrading existing packages to the latest version:
sudo pacman -Syu
Then, install the required packages for RackTables using the pacman package manager:
sudo pacman -S git nginx php php-fpm php-gd php-mbstring php-mysql mariadb
RackTables requires a database to store its data. In this step, we will configure MariaDB.
Start by enabling and starting the MariaDB service:
sudo systemctl enable --now mariadb.service
After that, run the mysql_secure_installation command to improve the security of the database server and set a root password:
sudo mysql_secure_installation
Follow the on-screen prompts to set a robust password and answer the remaining questions about security, such as whether to remove anonymous users and the test database.
Once you have secured the database server, log in to the MariaDB server using the root credentials:
sudo mysql -u root -p
Then, create a new database for RackTables:
CREATE DATABASE racktables;
Create a new user account to access the RackTables database:
CREATE USER 'racktables'@'localhost' IDENTIFIED BY 'your_password';
Grant the new user account full access to the RackTables database:
GRANT ALL PRIVILEGES ON racktables.* TO 'racktables'@'localhost';
Finally, exit the MySQL shell:
exit
RackTables supports both Apache and Nginx web servers. In this tutorial, we will use Nginx.
Install the Nginx web server using pacman:
sudo pacman -S nginx
Next, start and enable the Nginx service:
sudo systemctl enable --now nginx.service
Open the Nginx configuration file for RackTables:
sudo nano /etc/nginx/conf.d/racktables.conf
And add the following content:
server {
listen 80;
server_name example.com;
access_log /var/log/nginx/racktables.log;
error_log /var/log/nginx/racktables_error.log;
index index.html index.php;
root /usr/share/webapps/racktables/wwwroot;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.(jpg|jpeg|png|gif|ico)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control "public";
}
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Save and close the file by pressing "Ctrl+X", followed by "Y", and hit "Enter".
Download the latest version of RackTables from its official website:
wget https://github.com/RackTables/racktables/archive/refs/tags/0.21.2.tar.gz
Note: Replace the version number with the latest available version.
Extract the downloaded file:
tar -xvzf 0.21.2.tar.gz
Move the extracted folder to the Nginx document root:
sudo mv racktables-0.21.2 /usr/share/webapps/racktables
Change the owner of the RackTables directory to the web server user:
sudo chown -R http:http /usr/share/webapps/racktables
Create a PHP configuration file for RackTables:
sudo nano /etc/php/php-fpm.d/racktables.conf
Add the following contents:
[www-racktables]
user = http
group = http
listen = /run/php-fpm/racktables.sock
listen.owner = http
listen.group = http
listen.mode = 0666
pm = ondemand
pm.max_children = 50
pm.process_idle_timeout = 10s;
php_admin_value[upload_max_filesize] = 32M
php_admin_value[post_max_size] = 32M
php_admin_value[memory_limit] = 512M
Save and close the file.
RackTables requires a configuration file to connect with the database. In this step, we will configure the RackTables configuration file.
Copy the sample configuration file to a new file:
sudo cp /usr/share/webapps/racktables/inc/config-dist.php /usr/share/webapps/racktables/inc/config.php
Open the configuration file for editing:
sudo nano /usr/share/webapps/racktables/inc/config.php
Find the following configuration lines:
$db_username = 'user';
$db_password = 'password';
$db_server = 'localhost';
$db_name = 'racktables';
Replace the values with your RackTables database details:
$db_username = 'racktables';
$db_password = 'your_password';
$db_server = 'localhost';
$db_name = 'racktables';
Save and close the file.
Start the PHP-FPM service:
sudo systemctl enable --now php-fpm.service
Visit RackTables web interface by opening your web browser and entering the server's IP address or hostname in the address bar.
http://your_server_ip_address/
You should see the RackTables login page. Enter the configuration details, including the default username and password, which are admin/admin.
Once logged in, you can start configuring your data center assets.
In this tutorial, we have shown you how to install RackTables on Manjaro. By following the above steps, you should be able to get RackTables up and running in no time. Happy managing!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!