How to Install Cacti on Manjaro

Cacti is a network monitoring tool that uses RRDtool to track and graph the performance of networks, devices, and applications. In this tutorial, we will walk through the steps to install Cacti on Manjaro.

Prerequisites

Before we begin, make sure you have the following:

Step 1: Install required dependencies

Before we can install Cacti, we need to install some required dependencies.

Open a terminal and run the following command to update your system:

sudo pacman -Syu

Then install Apache Web Server, PHP, and other required packages by running:

sudo pacman -S apache php php-apache mariadb mariadb-clients mariadb-libs net-snmp net-snmp-utils

During the installation, you will be prompted to enter a password for the MariaDB root user. Make sure to choose a strong password and remember it.

Step 2: Configure Apache Web Server

To configure Apache Web Server for Cacti, we'll need to create a new configuration file. Run the following command to create a new file:

sudo nano /etc/httpd/conf/extra/cacti.conf

Add the following lines to the file:

Alias /cacti /usr/share/webapps/cacti

<Directory /usr/share/webapps/cacti>
    Options FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Save and close the file by pressing Ctrl + X, then Y, and Enter.

Now, start the Apache web server and enable it to start at boot time:

sudo systemctl start httpd
sudo systemctl enable httpd

Step 3: Configure MariaDB for Cacti

Next, we need to create a database and user for Cacti in MariaDB. Run the following command to log in to the MariaDB console:

sudo mysql -u root -p

Enter the password you set during the installation and press Enter.

Create a new database for Cacti:

CREATE DATABASE cacti;

Create a new user and grant permissions to the Cacti database:

CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cacti.* TO 'cactiuser'@'localhost';
FLUSH PRIVILEGES;

Replace password with a strong password of your choice.

Exit the MariaDB console:

exit

Step 4: Install Cacti

The next step is to download and install Cacti.

Run the following command to download the latest version of Cacti:

sudo pacman -S cacti

During the installation, you will be prompted to choose a web server. Select apache when prompted.

Now, run the following command to create the Cacti database tables:

sudo /usr/share/webapps/cacti/install/index.php

Follow the on-screen instructions to configure the database settings. You will need to enter the root password you set during the MariaDB installation and the credentials for the new cactiuser.

Once the installation is complete, restart Apache:

sudo systemctl restart httpd

Step 5: Access Cacti Web Interface

Cacti is now installed and configured on your Manjaro system.

Open your web browser and go to http://localhost/cacti. You should see the Cacti login screen.

Enter the default username admin and password admin to log in.

Congratulations, you have successfully installed Cacti on Manjaro!

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!