In this tutorial, we will guide you through the steps of installing Cacti on EndeavourOS Latest version.
Before starting the installation process, you must have the following:
The first step is to update the system to the latest version. Open up the terminal and run the following commands one by one:
sudo pacman -Syy
sudo pacman -Syu
These commands will update the package repository and upgrade the system to the latest available version.
Cacti requires a web server to run. We will use the Apache web server for this tutorial. Run the following command to install the Apache web server:
sudo pacman -S apache
After the installation of Apache web server, start and enable it to run on system boot:
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
Cacti requires a database server to store the monitoring data. We will use MariaDB for this tutorial. Run the following command to install MariaDB database server:
sudo pacman -S mariadb
After the installation of MariaDB, run the following command to start the MariaDB service and enable it to run on system boot:
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service
Now run the MariaDB secure installation utility to set the database root password and remove the anonymous user accounts:
sudo mysql_secure_installation
Cacti is built using PHP scripting language. Run the following command to install the PHP and required modules:
sudo pacman -S php php-fpm php-gd php-mbstring php-snmp php-mysql
Now it's time to install the Cacti monitoring system. Run the following command to install Cacti:
sudo pacman -S cacti
After the installation of Cacti, we need to configure it to work with Apache web server and MariaDB database server. Run the following command to open the Cacti configuration file:
sudo nano /etc/webapps/cacti/apache.conf
Change the following lines as shown below:
Alias /cacti /usr/share/webapps/cacti
<Directory /usr/share/webapps/cacti/>
Options None
AllowOverride None
Require all granted
</Directory>
Save and close the file.
Now run the following command to create the Cacti database and a dedicated user for it:
sudo mysql -u root -p
> CREATE DATABASE cacti;
> GRANT ALL PRIVILEGES ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser_password';
> FLUSH PRIVILEGES;
> EXIT;
Note: Replace "cactiuser_password" with your own strong password.
Now import the Cacti database schema to the newly created database using the following command:
sudo mysql -u cactiuser -p cacti < /usr/share/webapps/cacti/cacti.sql
Note: Enter the password of the "cactiuser" when prompted.
Cacti requires a username and password to login. Run the following command to configure the Cacti login:
sudo nano /usr/share/webapps/cacti/include/config.php
Find the following lines:
$database_password = '';
Replace it with the following:
$database_password = 'cactiuser_password';
Note: Replace "cactiuser_password" with the password you have given for the "cactiuser" account.
Finally, start the Cacti service to apply the changes:
sudo systemctl start cacti.service
Open up your web browser and visit the following URL:
http://your_server_IP/cacti
Replace "your_server_IP" with your own server IP address or domain name. You will see the Cacti login page, enter the default username "admin" and password "admin" to access the Cacti dashboard.
Congratulations on successfully installing Cacti on EndeavourOS Latest version. You can now start monitoring your network and servers with Cacti.
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!