You are on page 1of 29

Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.

x and Fedora 21-12

 


MONITORING TOOLS  218

Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and


Fedora 21-12
by Ravi Saive | Published: March 19, 2015 | Last Updated: March 19, 2015

 Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators | 4 Free Shell Scripting
eBooks

Preparation for the LFCE (Linux Fundation Certified Engineer) Exam

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Cacti tool is an open source web based network monitoring and system monitoring graphing solution for IT
business. Cacti enables a user to poll services at regular intervals to create graphs on resulting data using
RRDtool. Generally, it is used to graph time-series data of metrics such as network bandwidth utilization,
CPU load, running processes, disk space etc.

Install Cacti in RHEL / CentOS / Fedora

In this how-to we are going to show you how to install and setup complete network monitoring application
called Cacti using Net-SNMP tool on RHEL 7.x/6.x/5.x, CentOS 7.x/6.x/5.x and Fedora 21-12 systems
using YUM package manager tool.

Cacti Required Packages


The Cacti required following packages to be installed on your Linux operating systems like RHEL /
CentOS / Fedora.

Apache : A Web server to display network graphs created by PHP and RRDTool.
MySQL : A Database server to store cacti information.
PHP : A script module to create graphs using RRDTool.
PHP-SNMP : A PHP extension for SNMP to access data.
NET-SNMP : A SNMP (Simple Network Management Protocol) is used to manage network.
RRDTool : A database tool to manage and retrieve time series data like CPU load, Network

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Bandwidth etc.

Installing Cacti Required Packages on RHEL /


CentOS / Fedora
First, we need to install following dependency packages one-by-one using YUM package manager tool.

Install Apache

# yum install httpd httpd-devel

Apache Web Server Installation

Install MySQL

# yum install mysql mysql-server

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

MySQL Installation

MariaDB is a community-developed fork of the MySQL database project, and provides a replacement for
MySQL. Previously the official supported database was MySQl under RHEL/CentOS 6.x/5.x and Fedora.

Recently, RedHat makes a new transaction from MySQl to MariaDB, as MariaDB is the default
implementation of MySQL in RHEL/CentOS 7.x and Fedora 19 onwards..

# yum install mariadb-server -y [On RHEL/CentOS 7.x and Fedora 19 onwards]

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Installation of MariaDB Database

Install PHP

# yum install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

PHP Installation with Modules

Install PHP-SNMP

# yum install php-snmp

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

SNMP Installation

Install NET-SNMP

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

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Install SNMP Utils

Install RRDTool

# yum install rrdtool

Install Rrdtool

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Staring Apache, MySQL and SNMP Services


Once you’ve installed all the required software’s for Cacti installation, lets start them one-by-one using
following commands.

On RHEL/CentOS 6.x/5.x and Fedora 18-12

[root@tecmint ~]# service httpd start


[root@tecmint ~]# service mysqld start
[root@tecmint ~]# service snmpd start

Start Services Using init

On RHEL/CentOS 7.x and Fedora 19 Onwards

[root@tecmint ~]# systemctl start httpd.service


[root@tecmint ~]# systemctl start mariadb.service
[root@tecmint ~]# systemctl start snmpd.service

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Start Services Using systemctl

Configure Start-up Links


Configuring Apache, MySQL and SNMP Services to start on boot.

On RHEL/CentOS 6.x/5.x and Fedora 18-12

[root@tecmint ~]# /sbin/chkconfig --levels 345 httpd on


[root@tecmint ~]# /sbin/chkconfig --levels 345 mysqld on
[root@tecmint ~]# /sbin/chkconfig --levels 345 snmpd on

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Enable Services at Boot Using chkconfig

On RHEL/CentOS 7.x and Fedora 19 Onwards

[root@tecmint ~]# systemctl enable httpd.service


[root@tecmint ~]# systemctl enable mariadb.service
[root@tecmint ~]# systemctl enable snmpd.service

Enable Services at Boot Using systemctl

Install Cacti on RHEL / CentOS / Fedora


Here, you need to install and enable EPEL Repository. Once you’ve enabled repository, type the following
command to install Cacti application.

# yum install cacti

Sample Output:

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Loaded plugins: fastestmirror, langpacks


epel/x86_64/metalink
| 4.7 kB 00:00:00
epel
| 4.4 kB 00:00:00
(1/2): epel/x86_64/group_gz
| 250 kB 00:00:03
(2/2): epel/x86_64/primary_db
| 4.0 MB 00:02:20
(1/2): epel/x86_64/updateinfo
| 315 kB 00:00:09
(2/2): epel/x86_64/pkgtags
| 1.4 MB 00:00:59
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: ftp.cuhk.edu.hk
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package cacti.noarch 0:0.8.8b-7.el7 will be installed
--> Processing Dependency: rrdtool for package: cacti-0.8.8b-7.el7.noarch
--> Processing Dependency: net-snmp-utils for package: cacti-0.8.8b-7.el7.noarch
--> Running transaction check
---> Package net-snmp-utils.x86_64 1:5.7.2-18.el7 will be installed
---> Package rrdtool.x86_64 0:1.4.8-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================
=======================================================================================
===============
Package Arch
Version Repository
Size
=======================================================================================
=======================================================================================
===============
Installing:
cacti noarch
0.8.8b-7.el7 epel
2.1 M
Installing for dependencies:
net-snmp-utils x86_64
1:5.7.2-18.el7 base
195 k
rrdtool x86_64
1.4.8-8.el7 base
368 k

Transaction Summary

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

=======================================================================================
=======================================================================================
===============
Install 1 Package (+2 Dependent packages)

Total download size: 2.7 M


Installed size: 7.2 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): net-snmp-utils-5.7.2-18.el7.x86_64.rpm
| 195 kB 00:00:04
warning: /var/cache/yum/x86_64/7/epel/packages/cacti-0.8.8b-7.el7.noarch.rpm: Header
V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY==============- ] 56 kB/s |
2.4 MB 00:00:05 ETA
Public key for cacti-0.8.8b-7.el7.noarch.rpm is not installed
(2/3): cacti-0.8.8b-7.el7.noarch.rpm
| 2.1 MB 00:00:53
(3/3): rrdtool-1.4.8-8.el7.x86_64.rpm
| 368 kB 00:02:47
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
-------------------
Total
16 kB/s | 2.7 MB 00:02:47
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
Userid : "Fedora EPEL (7) "
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
Package : epel-release-7-5.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : rrdtool-1.4.8-8.el7.x86_64
1/3
Installing : 1:net-snmp-utils-5.7.2-18.el7.x86_64
2/3
Installing : cacti-0.8.8b-7.el7.noarch
3/3
/var/tmp/rpm-tmp.mR0t1v: line 1: fg: no job control
warning: %post(cacti-0.8.8b-7.el7.noarch) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package cacti-0.8.8b-7.el7.noarch
Verifying : 1:net-snmp-utils-5.7.2-18.el7.x86_64
1/3
Verifying : rrdtool-1.4.8-8.el7.x86_64
2/3
Verifying : cacti-0.8.8b-7.el7.noarch
3/3

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Installed:
cacti.noarch 0:0.8.8b-7.el7

Dependency Installed:
net-snmp-utils.x86_64 1:5.7.2-18.el7
rrdtool.x86_64 0:1.4.8-8.el7

Complete!

Configuring MySQL Server for Cacti Installation


We need to configure MySQL for Cacti, to do this we need to set password for our newly installed MySQL
server and then we will create Cacti database with user Cacti. If you’re MySQL is already password
protected, then don’t need to set it again.

Set MySQL Password


To set new password for MySQL server, use the following command. (Note : This is for new MySQL
installation only).

[root@tecmint ~]# mysqladmin -u root password YOUR-PASSWORD-HERE

Create MySQL Cacti Database


Login into MySQL server with newly created password and create Cacti database with user Cacti and set
the password for it.

On RHEL/CentOS 6.x/5.x and Fedora 18-12

[root@tecmint ~]# mysql -u root -p


Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database cacti;


Query OK, 1 row affected (0.00 sec)

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'tecmint';


Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH privileges;


Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye

On RHEL/CentOS 7.x and Fedora 19 Onwards

[root@tecmint ~]# mysql -u root -p


Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database cacti;


Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'tecmint';


Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH privileges;


Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;


Bye

Install Cacti Tables to MySQL


Find out the database file path using RPM command, to install cacti tables into newly created Cacti
database, use the following command.

# rpm -ql cacti | grep cacti.sql

Sample Output:

/usr/share/doc/cacti-0.8.8b/cacti.sql

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Now we’ve of the location of Cacti.sql file, type the following command to install tables, here you need to
type the Cacti user password.

[root@tecmint ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8b/cacti.sql


Enter password:

Configure MySQL settings for Cacti


Open the file called /etc/cacti/db.php with any editor.

# vi /etc/cacti/db.php

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

/* make sure these values reflect your actual database/host/user/password */


$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cacti";
$database_password = "your-password-here";
$database_port = "3306";
$database_ssl = false;

Configuring Firewall for Cacti


On RHEL/CentOS 6.x/5.x and Fedora 18-12

[root@tecmint ~]# iptables -A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT
[root@tecmint ~]# iptables -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
[root@tecmint ~]# service iptables save

On RHEL/CentOS 7.x and Fedora 19 Onwards

[root@tecmint ~]# firewall-cmd --permanent --zone=public --add-service=http


[root@tecmint ~]# firewall-cmd --reload

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Configuring Apache Server for Cacti Installation


Open file called /etc/httpd/conf.d/cacti.conf with your choice of editor.

# vi /etc/httpd/conf.d/cacti.conf

You need to enabled access to Cacti application for your local network or per IP level. For example we've
enabled access to our local LAN network 172.16.16.0/20. In your case, it would be different.

Alias /cacti /usr/share/cacti


 
<Directory /usr/share/cacti/>
Order Deny,Allow
Deny from all
Allow from 172.16.16.0/20
</Directory>

In latest version of Apache (ex: Apache 2.4), you may need to change according to the following settings.

Alias /cacti /usr/share/cacti

<Directory /usr/share/cacti/>
<IfModule mod_authz_core.c>
# httpd 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
Deny from all
Allow from all
</IfModule>
</Directory>

Finally, restart the Apache service.

[root@tecmint ~]# service httpd restart [On RHEL/CentOS


6.x/5.x and Fedora 18-12]

[root@tecmint ~]# systemctl restart httpd.service [On RHEL/CentOS 7.x


and Fedora 19 onwards]

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Setting Cron for Cacti


Open file /etc/cron.d/cacti.

# vi /etc/cron.d/cacti

Uncomment the following line. The poller.php script runs every 5mins and collects data of known host
which is used by Cacti application to display graphs.

#*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Running Cacti Installer Setup


Finally, Cacti is ready, just go to http://YOUR-IP-HERE/cacti/ & follow the installer instruction through the
following screens. Click Next button.

Cacti Setup Screen

Please choose installation Type as "New Install".

Select Cacti New Install

Make sure all the following values are correct before continuing. Click Finish button.

Cacti Installation Directories

Cacti Login Screen, enter username as admin and password as admin.

Cacti Login Screen

Once you've entered username and password, it will ask you to enter a new password for cacti.

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Cacti Force Password Screen

Cacti Console Screen.

Cacti Console Screen

How to Create New Graphs


To create graphs, Click on New Graphs --> Select Host --> Select SNMP - Interface Statistics and Select a
graph type In/Out Bits. Click on Create button. Please refer screen below.

How to Create Graphs in Cacti

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Cacti Monitoring Graphs

For more information and usage please visit the Cacti Page.

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

If You Appreciate What We Do Here On TecMint,


You Should Consider:
1. Stay Connected to: Twitter | Facebook | Google Plus
2. Subscribe to our email updates: Sign Up Now
3. Use our Linode referral link if you plan to buy VPS (it starts at only
$10/month).
4. Support us via PayPal donate - Make a Donation
5. Support us by downloading our premium books in PDF format

We are thankful for your never ending support.

Tags: cacti

Ravi Saive View all Posts


I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves
 to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.
Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to
become an TecMint author.

Receive Your Free Complimentary eBook NOW! - Self-Service Linux®: Mastering the
Art of Problem DeterminationUnderstanding the Linux® Virtual Memory Manager

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

NEXT STORY

Single User Mode: Resetting/Recovering Forgotten Root User Account Password in 


RHEL/CentOS 7

PREVIOUS STORY
 RHCSA Series: How to Manage Users and Groups in RHEL 7 – Part 3

 YOU MAY ALSO LIKE...

 2  30

20 Useful Commands of ‘Sysstat’ Utilities (mpstat, 13 Linux Network Configuration and


pidstat, iostat and sar) for Linux Performance Troubleshooting Commands
Monitoring

24 SEP, 2012
4 SEP, 2014

 14

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Install IfTop (Bandwidth Monitoring) Tool in RHEL


/ CentOS / Fedora

5 OCT, 2012

218 RESPONSES

 Comments 17  Pingbacks 0

Banu  May 4, 2016 at 2:54 pm


Where’s the cacti path installed?
Reply

Ravi Saive  May 4, 2016 at 3:04 pm



@Banu,
There isn’t any one place, the Cacti tool gets installed all over the file-system, but the main
configuration files resides under /etc/cacti directory..
Reply

Szilard  April 22, 2016 at 12:35 pm


In case of mysql is not on localhost you also need to enable network access for httpd (SElinux)

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

else you will have errors like :


FATAL: Cannot connect to MySQL server on ‘192.168.1.10’. Please make sure you have
specified a valid MySQL database name in ‘include/config.php’
setsebool -P httpd_can_network_connect=1
Reply

Zaya  April 18, 2016 at 6:37 pm


I have a problem same as Jhay, When I have got “FATAL: Cannot connect to MySQL server on
‘10.0.0.1’. Please make sure you have specified a valid MySQL database name in
‘include/config.php’”.
My server is running on 10.0.0.1.
I have created cacti database on mysql, and mysql is working fine. How I can solve?
Reply

Ravi Saive  April 19, 2016 at 10:01 am



@Zaya,
Please add the 10.0.0.1 IP address in db.php file under /etc/cacti/ directory like this:
$database_hostname = "10.0.0.1";
I hope it will solve your MySQL connectivity problem..
Reply

James Otto  March 29, 2016 at 9:12 pm


When I try to start mysql service I get the following error
[vagrant@server1 /]$ sudo service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Failed to start mysqld.service: Unit mysqld.service failed to load: No such file or directory.
What file or directory is missing?
Reply

Guilherme Henrique  March 10, 2016 at 6:57 pm


Dear Mr. Ravi Saive, thank you for a great explanation.
Reply

Subhasish Bhattacharya  February 18, 2016 at 6:12 pm


Dear Mr. Ravi Can you please provide some thorough tutorial on oracle DBA administration. from
very first installation to common problems manage/troubleshoot oracle 11G/12C. I will be thankful
to you.
Reply

Ravi Saive  February 18, 2016 at 7:03 pm



@Subhasish,
We’ve already covered about Oracle related articles, here is the installation of Oracle 11g and

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

12c:
http://www.tecmint.com/oracle-database-11g-release-2-installation-in-linux/
http://www.tecmint.com/oracle-12c-installation-in-centos-6/
Reply

Jhay Brombuela  February 15, 2016 at 6:58 am


Hi
I have error on Cacti Installation which is “FATAL: Cannot connect to MySQL server on
‘localhost’. Please make sure you have specified a valid MySQL database name in
‘include/config.php'” pls help me to fix this
Reply

Ravi Saive  February 15, 2016 at 11:07 am



@Jhay,
It’s clear that the MySQL cacti database doesn’t exits on the server, have you created Cacti
database in the MySQL server, before attempting installation? Please create one as instructed it
this article and try again the installation..
Reply

Jhay Brombuela  February 18, 2016 at 11:25 am


Hi Sir @Ravi Saive, I already fixed my problem. I noticed the password that i set in MySql
Settings for cacti was not match to my root password. I am now able to use CACTI. Thank you
for your response and thanks for this great tutorial. Hope you post a tutorial of Installation and
configuration of Samba file server and Squid proxy server. God bless you Sir….
Reply

Ravi Saive  February 18, 2016 at 2:18 pm



@Jhay,
That’s good to hear that you’ve fixed problem yourself and thanks for appreciating my work.
Yes, we’re already covered about Samba and Squid server related articles here, you can go
through it.
http://www.tecmint.com/setup-samba-file-sharing-for-linux-windows-clients/
http://www.tecmint.com/configure-squid-server-in-linux/
Keep visiting and God bless you too brother..:)
Reply

Jolene9  February 11, 2016 at 1:36 pm


Hi,
I have finished Cacti installations but i still can’t see graphs. For rrd files RRDTools says
‘ERROR: opening ‘/usr/share/cacti/rra/localhost_load_1min_5.rrd’: No such file or directory’.. I’ve
tried changing the group ownership of rra directory to apache as mentioned above but it didn’t
work.
What I’m supposed to do next? Hope that there’s someone who can help here.

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

Thanks!
Reply

Ravi Saive  February 13, 2016 at 12:53 pm



@Jolene,
It seems that rrdtool tool didn’t generating those files, it could be the permission issues on
/usr/share/cacti/ directory or try to rebuild Poller Cache from System Utilities (bottom of console).
Reply

Aleksei  February 19, 2016 at 12:31 pm


I have another problem, that all graps are not showing anything, they are empty, just none.
Where the problem could be?
Reply

Ravi Saive  February 20, 2016 at 10:41 am



@Aleksei,
Please check your SELinux settings and try to disable it and run the poller cron again and
see the graphs are generating or not. Also check logs for any errors..
Reply

« Older Comments

GOT SOMETHING TO SAY? JOIN THE DISCUSSION.

Comment

Name * Email *

Website

Post Comment
Notify me of followup comments via e-mail. You can also subscribe without commenting.

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

LINUX MONITORING TOOLS

Wireshark – Network Protocol Analyzer Tool for RHEL/CentOS/Fedora


16 AUG, 2012

NetHogs – Monitor Per Process Network Bandwidth Usage in Real Time


11 MAR, 2013

13 Linux Network Configuration and Troubleshooting Commands


24 SEP, 2012

CloudStats.me – Monitors Your Linux Servers and Websites from the Cloud
25 JUL, 2014

LINUX INTERVIEW QUESTIONS

10 Useful “Squid Proxy Server” Interview Questions and Answers in Linux


28 JUL, 2014

Shilpa Nair Shares Her Interview Experience on RedHat Linux Package Management

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12

23 JUN, 2015

10 Useful ‘ls’ Command Interview Questions – Part 2


7 MAR, 2015

10 Interview Questions and Answers on Various Commands in Linux


22 MAR, 2014

OPEN SOURCE TOOLS

Ethernet Channel Bonding aka NIC Teaming on Linux Systems


14 SEP, 2013

Install Elgg to Create Own Online Social Networking Site


3 MAY, 2013

20 Free Open Source Softwares I Found in Year 2015


14 DEC, 2015

MultiTail – Monitor Multiple Files Simultaneously in a Single Linux Terminal


3 MAR, 2014

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]


Install Cacti (Network Monitoring) on RHEL/CentOS 7.x/6.x/5.x and Fedora 21-12


Tecmint: Linux Howtos, Tutorials & Guides © 2016. All Rights Reserved.
This work is licensed under a (cc) BY-NC
The material in this site cannot be republished either online or offline, without our permission.

    

file:///D|/...20file/Install%20Cacti%20(Network%20Monitoring)%20on%20RHEL_CentOS%207.x_6.x_5.x%20and%20Fedora%2021-12.htm[15/05/2016 3:00:51 PM]

You might also like