How to Install Cacti 1.0.4 on Centos 6

Install Apache & PHP modules

yum install httpd php-process php-snmp php-hd php-mbstring

chkconfig httpd on

/etc/init.d/httpd start

Install SNMP

yum install net-snmp net-snmp-utils

Install RRDTool

yum install rrdtool

Install and configure Cacti

cd /tmp


tar zxvf cacti-1.0.4.tar.gz

mv cacti-1.0.4 /var/www/html/cacti

useradd cactiuser -s /sbin/nologin

cd /var/www/html/cacti

chown -R cactiuser rra/ log/

vi /var/www/html/cacti/include/config.php

$rdatabase_type     = 'mysql';
$rdatabase_default  = 'cacti';
$rdatabase_hostname = 'localhost';
$rdatabase_username = 'cactiuser';
$rdatabase_password = 'password';
$rdatabase_port     = '3306';
$rdatabase_ssl      = false;

Install and configure MySQL

yum install mysql-server

chkconfig mysqld on

/etc/init.d/mysqld start


mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql -p

mysql -u root -p

mysql> GRANT SELECT ON mysql.time_zone_name to 'cactiuser'@'localhost' IDENTIFIED BY 'password';`

mysql -u root -p

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

mysql -u root -p cacti < /var/www/html/cacti/cacti.sql

Configure cron

vi /etc/crontab

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Finishing the installation

Point your web browser to http://your-server/cacti