Cacti is an open-source network monitoring system that provides a web-based front-end for graphing data from various network devices. In this tutorial, we will be installing Cacti on Void Linux.
Before we get started with the installation process, we need to ensure that our system is up-to-date and that we have a few necessary packages installed.
sudo xbps-install -S
sudo xbps-install -y apache php php-gd php-mysqlnd mariadb-server net-snmp-utils rrdtool
Note: We will be using the MariaDB database system as our backend.
Once we have our system updated and the necessary packages installed, we can now proceed with the installation of Cacti.
wget https://www.cacti.net/downloads/cacti-x.x.x.tar.gz
Replace x.x.x with the latest version available.
tar -xvzf cacti-x.x.x.tar.gz
sudo mv cacti-x.x.x /srv/http/
sudo mysql -u root -p
CREATE DATABASE cacti_db;
CREATE USER 'cacti_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON cacti_db.* TO 'cacti_user'@'localhost';
FLUSH PRIVILEGES;
Replace "password" with your desired password.
sudo mysql -u cacti_user -p cacti_db < /srv/http/cacti-x.x.x/cacti.sql
sudo nano /srv/http/cacti-x.x.x/include/config.php
Change the following parameters:
$database_type = 'mysql';
$database_default = 'cacti_db';
$database_hostname = 'localhost';
$database_username = 'cacti_user';
$database_password = 'password';
sudo chown -R http:http /srv/http/cacti-x.x.x
sudo chmod -R 775 /srv/http/cacti-x.x.x/rra/
Now that we have installed Cacti, we need to perform some additional configurations.
sudo systemctl start mariadb
sudo systemctl enable snmpd
php.ini
file:sudo nano /etc/php/php.ini
Uncomment the following line and set your desired timezone:
date.timezone = "America/New_York"
sudo systemctl restart httpd
Once all the configurations are done, we can now access Cacti by opening a web browser and typing our server's IP address or domain name followed by "/cacti" in the address bar:
http://<server_IP_or_domain_name>/cacti/
You should be greeted with the Cacti login screen. Use the default login with admin as the username and admin as the password.
We have successfully installed Cacti on Void Linux and configured it for use. With this network monitoring system up and running, we can now monitor our network devices and detect any issues that may arise.
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!