How to Install Cacti from EPEL on RHEL 6

Install EPEL repository

rpm -ivh

Install required packages

yum --enablerepo=rhel-6-server-optional-rpms install cacti mysql-server

Configure MySQL

chkconfig mysqld on


mysql> create database cacti;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'password';
mysql> flush privileges;
mysql> quit

mysql -u root -p cacti < /usr/share/doc/cacti-0.8.8h/cacti.sql

Configure Cacti

vi /etc/cacti/db.php

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

Configure Apache

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

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

/etc/init.d/httpd restart

Configure Cron

vi /etc/cron.d/cacti

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

Configure IPptables

vi /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

/etc/init.d/iptables restart