How to install Cacti on Centos 7


Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality. Cacti provides a fast poller, advanced graph templating, multiple data acquisition methods, and user management features out of the box. All of this is wrapped in an intuitive, easy to use interface that makes sense for LAN-sized installations up to complex networks with thousands of devices.

How to To install Cacti on your CentOS 7.

we will follow below steps.

Step 01: First we need t install following dependency packages using yum package manager tool

Step 02: Install mariadb

Step 03: Install php

Step 04: Install php-SNMP

Step 05: Install net-snmp

# yum install net-snmp-utils net-snmp-libs -y

Step 06: Install RRDTool

Step07: Let’s install cacti now

If it does not work then we have to enable EPEL repository

After this install cacti

Step 08: Configure MySQL

Step 09: Create cacti database

Step 10: Install cacti tables on MySql

Step 11: Open file /etc/cacti/db.php with any editor

Make following changes and save. Make sure you set password correctly.

Also make sure those values reflect your actual database /host/user/password

Step 12: Now configure Apache for cacti.

Open file called /etc/httpd/conf.d/cacti.conf

We will change

Step 13: The newly created database user (mahbub) should have access to the mysql.time_zone_name Table. To do that, import the mysql_test_data_timezone.sql to mysql database first.

Grant the permission to cactiuser (mahbub)


Step 14: Cacti recommend changing MySQL variables settings for better performances.

Edit configuration file depends on the operating system.

Add variables in [mysqld] section.

Step 15:  Set the timezone by editing /etc/php.ini file.

Update the timezone as follows

Step 16: Now we will start Apache, MySQL and SNMP services

Step 17: enable service for start-up


Step 18: Configure the firewall to allow HTTP service.

Step 19: It is recommended to permanently disable SELinux for Cacti to work correctly. To temporarily disable the SELinux, run the following command in the terminal.

Step 20: Create Cron for cacti

Open file /etc/cron.d/cacti

And uncomment


Step 21: Now go to web browser and type localhost/cacti and hit enter

cacti installation page will appear.Accept License agreement and begin installation.

Complete installation as per instructions.

From web browser visit localhost/cacti/index.php

In your cacti login page provide default user name “admin” and default password “admin”. You have to change password for the first time.

After login to cacti you will get cacti dashboard, where you can add devices and create graphs.

At the left side of dashboard you will all options to implement.

To add a device:

Click on Management then device and at the right corner click on (+) add to add a device.

After provide required information at the right bottom corner click on create.

To create graph: First go to console then click “Create graphs for your new devices”.

Select your previous added device then select graph types and then click on save.

Those are very simple ways to you add your network devices for monitoring. You will also get more advance features on cacti to get better monitoring of your network.

Enjoy Cacti Network Monitoring.

Spread the love
  • 3

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.


Please enter your comment!
Please enter your name here