Linux, Windows, Virtualization, OpenSource & Blogging

How to Install Cacti on Debian 9 Stretch

0

Cacti is an open source network monitoring tool designed as the front end application for the RRDtool. It allows users to poll services at an interval of time and resulting in a graph format.

With Cacti, you can get a graph for CPU and network bandwidth utilization. Also, it monitors the network traffic by polling a router or switch via SNMP.

Here is the post about installing Cacti on Debian 9.

Requirements

Switch to the root user.

su -

OR

sudo  su -

Update the repository index.

apt-get update

Install below packages for cacti installation.

apt-get -y install apache2 php php-mysql php-snmp mariadb-server mariadb-client snmpd rrdtool

Install Cacti

Install the cacti package using the apt-get command.

apt-get -y install cacti

Follow the onscreen instruction for setting up Cacti.

Select the web server and press enter to configure the web server for Cacti automatically. By doing this, Cacti eases our web server configuration you do it for accessing Cacti web interface.

In my case, the web server is apache2.

Install Cacti on Debian 9 - Webserver for Cacti
Install Cacti on Debian 9 – Webserver for Cacti

Click Yes to configure a database for cacti or click No to set up a database manually.

Install Cacti on Debian 9 - Create Database for Cacti
Install Cacti on Debian 9 – Create Database for Cacti

Enter the password for Cacti user for cacti database.

Install Cacti on Debian 9 - Set a Password for DB user
Install Cacti on Debian 9 – Set a Password for DB user

Reenter the password.

Install Cacti on Debian 9 - Confirm DB user password
Install Cacti on Debian 9 – Confirm DB user password

Configure Cacti

In Debian 9, you do not need to setup Cacti or go through the series of installation procedure over a web interface.

Access Cacti

Open up a browser and visit the below URL.

http://your.ip.add.ress/cacti

Login to Cacti using username “admin” and password “admin“.

Install Cacti on Debian 9 - Cacti Login Page
Install Cacti on Debian 9 – Cacti Login Page

Reset Cacti admin password (Optional)

I had to reset login password of the user admin as the default password was not working for me. If you are also unable to login to Cacti then follow below steps.

Log in Cacti database with the user cacti and the password you entered during the Cacti installation.

mysql -u root -p cacti

Run the following MySQL query. Replace yourpassword with the password of your choice.

update user_auth set password=md5('yourpassword') where username='admin';

The Cacti Dashboard will look like below after successful login.

Install Cacti on Debian 9 - Cacti Dashboard
Install Cacti on Debian 9 – Cacti Dashboard

Usage graph of a device (localhost):

Install Cacti on Debian 9 - Cacti Graph
Install Cacti on Debian 9 – Cacti Graph

Now you can add devices to Cacti and monitor its usage. More documentation can be found here.

That’s All.

POSTS YOU MAY LIKE -:)

You might also like

How to Install Cacti on Debian 9 Stretch

0