How To Install Cacti Monitoring on Ubuntu 20.04 LTS

Install Cacti Monitoring on Ubuntu 20.04

In this tutorial, we will show you how to install Cacti Monitoring on Ubuntu 20.04 LTS. For those of you who didn’t know, Cacti is an open-source, web-based network monitoring and graphing tool designed as a front-end application for the open-source, industry-standard data logging tool RRDtool. It is used to get CPU load and network bandwidth utilization in a graph format.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step by step installation Cacti Monitoring on a Ubuntu 18.04 LTS Focal Fossa server.

Install Cacti Monitoring on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

Step 2. Install LAMP server.

A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Configuring MariaDB for Cacti.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

Configure it like this:

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

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Cacti installation:

After that, log in to MariaDB:

Grant the permission to “idroot” user:

Step 4. Installing Cacti on Ubuntu 20.04.

Now we, run the below command to get install the SNMP and rrdtool for the monitoring of devices.

Next, download the latest version of the Cacti using the wget command:

After the download finished extract the downloaded package:

Next, edit the Cacti configuration file to specify the database type, database name, hostname, user, and password information:

Step 5. Configure Apache web server for Cacti.

Create a new config file with the name cacti.conf in the “/etc/apache2/sites-enabled”:

Use the following configuration:

Finally restart the apache server to take effects:

Step 6. Accessing Cacti Web Interface.

Cacti will be available on HTTP port 80 by default. Open your favorite browser and navigate to or http://server-ip-address and complete the required steps to finish the installation. You will get the “Cacti Installation Guide” on screen. Login with username: admin and password: admin and cacti force you to change the default password.

Install Cacti Monitoring on Ubuntu 20.04

Congratulations! You have successfully installed Cacti. Thanks for using this tutorial for installing Cacti Monitoring on Ubuntu 20.04 Focal Fossa system. For additional help or useful information, we recommend you to check the official Cacti website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!