Home / How To / How to install Cacti SNMP Monitoring Tool on Debian 10

How to install Cacti SNMP Monitoring Tool on Debian 10

Cacti is a free and open source code, web based network monitoring and graphics tools. It provides a fast poller with advanced graphic template creation and several methods of data collection. Cacti is a complete frontend for RRDTool, it stores all necessary monitoring device information to create graphics and fill them with data from the MySQL database.

In this tutorial we will show you how to install Cacti on Debian Buster 1

0. We will install Cacti under the LAMP stack, Apache web server, PHP 7.3 and MariaDB server on the current Debian Buster 10.


For this tutorial we will install Cacti on a Debian system with 1 GB RAM, 25 GB free disk space and 2 processor. We will also use the sudo root privileges to install packages and edit the configuration in the system.

What will we do?

  • Install Apache Web Server
  • Install and Configure MariaDB Server
  • Install and Configure PHP 7.3 [19659007] Install Additional Packages
  • Install Cactus on Debian 10
  • Test

Step 1 – Install Apache Web Server [19659012] First, we will install Apache web server on the Debian 10 server.

Update all repositories on the Debian system and install Apache2 packages using the apt command below.

  sudo apt update 
sudo apt install apache2 apache2-utils

When all installation is complete, start the Apache2 service and add it to the system boot.

  systemctl start apache2 
systemctl enable apache2

The Apache2 web server is running, check it using the systemctl command below.

  systemctl status apache2 

<img src = "data: image / svg + xml,% 3Csvg% 20xmlns% 3D% 22http% 3A% 2F% 2Fwww.w3.org% 2F2000% 2Fsvg% 22% 20width% 3D % 22750% 22% 20height% 3D% 22275% 22% 3E% 3C% 2Fsvg% 3E "alt =" Install Apache Web Server [19659021] A The result is that the installation of the Apache2 web server is complete.

Step 2 – Install MariaDB

In this step, we will install and configure the MariaDB database server.

Install the MariaDB database with the apt command below.

  sudo apt install mariadb server 

When all installation is complete, start MariaDB service and adds it to the system startup.

  systemctl start mariadb 
systemctl enable mariadb

MariaDB service is up and running.

Then we will to edit the MariaDB configuration for the Cacti installation.

Edit the MariaDB configuration /etc/mysql/mariadb.conf.d/ 50-server.cnf & # 39; with vim edit one.

  vim /etc/mysql/mariadb.conf.d/50-server.cnfebrit19659016 ?? Paste the following configuration under the section "[mysqld]" as below. ... 
inviting 10000
innodb_file_format = Barracuda
innodb_large_prefix = 1

Save and close.

Restart the MariaDB service and make sure there is no error, then check the MariaDB service status.

19659036] Ads

  systemctl restart mariadb 
systemctl status mariadb

Below is the result you will get.

 Install MariaDB for Cacti

As a result, the installation and configuration of MariaDB Server for Cacti installation has been successfully completed.

Step 3 – Install PHP 7.3

In this step we will install PHP 7.3 packages with additional packages needed for the Cacti installation.

Install PHP 7.3 packages using the apt command below. Ads

  sudo apt install php php-common php-mysql php-snmp php-xml php-mbstring php-json php-gd php-gmp php-zip php-ldap php-pear php-php-gettext php-phpseclib php-twig 

When all installations are complete, go to the & # 39; /etc/php/7.3&#39; directory.

  cd /etc/php/7.3/vud19659016achteChange the "php.ini" configuration for both Apache2 and cli. 

  vim apache2 / php.ini 
vim cli / php.ini

Deselect the & # 39; date.timezone & # 39; and change the value with your time zone.

  date.timezone = Asia / Singapore 

Uncheck now & # 39; cgi. fix_pathinfo & # 39; and change the thge value to & # 39; 0 & # 39 ;.

  cgi.fix_pathinfo = 0 

Save and close.

Then restart the Apache2 service to apply the new configuration.

  systemctl restart apache2 [19659016] As a result, the installation and configuration of PHP 7.3 for the Cacti installation has been completed. 

 Setting PHP for Cacti

In this step we will install the SNMP and rrdtool packages for the Debian 10 server.

SNMP or (Simple Network Management Protocol) is used for exchange management information between the agent (server) and clients. And the round robin (Round Robin the Database tool) is used to store and display time series data for system monitoring with graphical support. Ads [19659024] Install the SNMP package and rrdtool using the apt command below.

  sudo apt install snmp php-snmp rrdtool librrds-perl 

When all the installation is complete, go to the next step to install the Cacti Monitoring Tool. [19659065] Step 5 - Install Cactus

By default, the Cacti monitoring tool is available in the Debian Buster 10 archive, can be installed with the apt command.

View the cacti package on the Debian archive with the following command.

  sudo apt search cacti 
sudo apt show cacti

Now install Cacti and the Cacti backbone (Alternative pools based on C) using the apt command below.

  sudo apt install cacti backbone 

During installation, you will be asked about the web server and d bconfig-common configuration.

For web server configuration, select & # 39; apache2 & # 39; and select & # 39; OK & # 39 ;.

 Setup Apache for Cacti

Then you will be prompted for the database configuration by & # 39; dbconfig-common & # 39 ;, select & # 39; Yes & # 39; to proceed.

 Setup Cacti with dbconfig-common

Now enter your password for the cactus database configuration and cacti administrator login.

 setting cactus administrator and database password

Repeat the password and select & # 39; OK ".

 setting of cactus administrator and database password And the Cacti installation is complete, it is now available from the browser.

Step 6 - Testing

Open your web browser and type the server's IP address with the path & # 39; cactus & # 39; in the address bar.

http: // serverip / cactus /

Now you will get Cacti's login page as below.

 Cacti login admin

Type the default user administrator with the password that you just configured and click on the button Login .

Now you get the Cacti Admin Dashboard as below.

 Cacti Admin Dashboard

As a result has the installation and configuration of Cacti monitoring system the tool with the LAMP stack on Debian Buster 10 has been successfully implemented.

Source link