Cacti is a network monitoring tool that provides comprehensive graphs of your network usage. It is an open-source, web-based application written in PHP.
This tutorial will guide you on how to install Cacti on MXLinux Latest.
Before installing Cacti, you will need:
Cacti requires a web server and PHP to run. Install Apache and PHP using the following command:
sudo apt-get update
sudo apt-get install apache2 php
Cacti requires a database to store data. Install MySQL using the following command:
sudo apt-get install mysql-server
During the installation, you will be prompted to set a root password. Remember this password, as you will need it later.
Download Cacti from the official website using the following command:
cd /tmp
wget https://www.cacti.net/downloads/cacti-latest.tar.gz
Extract the downloaded file using the following command:
tar -xvzf cacti-latest.tar.gz
Move the extracted folder to the web server document root using the following command:
sudo mv cacti-*/ /var/www/html/cacti
Create a new MySQL database and user for Cacti using the following command:
sudo mysql -u root -p
Enter the root password when prompted. Then, create a new database, user, and password using the following SQL statements:
CREATE DATABASE cacti;
CREATE USER 'cactiuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cacti.* TO 'cactiuser'@'localhost';
FLUSH PRIVILEGES;
exit;
Replace the 'password' with a strong password.
Edit the Cacti configuration file using the following command:
sudo nano /var/www/html/cacti/include/config.php
Find the following lines in the file:
$database_type = 'mysql';
$database_default = 'cacti';
$database_hostname = 'localhost';
$database_username = 'cactiuser';
$database_password = 'cactiuserpassword';
Change the values according to your MySQL settings:
$database_default
: the database name you created in step 4 (e.g., 'cacti')$database_username
: the database user you created in step 4 (e.g., 'cactiuser')$database_password
: the password of the database user you created in step 4Save and close the file.
Set the necessary permissions for Cacti by running the following commands:
sudo chown -R www-data:www-data /var/www/html/cacti
sudo chmod -R 755 /var/www/html/cacti
sudo chmod 777 /var/www/html/cacti/rra/
Cacti can use Spine, a faster poller than the default cmd.php script. To install Spine, run the following commands:
sudo apt-get install spine
sudo nano /var/www/html/cacti/include/config.php
Find the following line in the file:
$poller_type = 'cmd.php';
Replace it with the following line:
$poller_type = 'spine';
Save and close the file.
Open a web browser and go to http://
Follow the instructions on the screen to complete the installation wizard.
Once the installation is complete, log in using the default credentials:
Congratulations! You have successfully installed Cacti on MXLinux Latest. You can now use Cacti to monitor your network usage and performance.
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!