cacti on centos 6




[root@desktop225 ~]#  yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd

[root@desktop225 ~]#mysqladmin -u root password NEWPASSWORD

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

mysql> create database cacti;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on cacti.* to cacti@localhost identified by ‘redhat’;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit

[root@desktop225 ~]#yum install net-snmp-utils php-snmp net-snmp-libs

[root@desktop225 ~]# vim /etc/snmp/snmpd.conf
com2sec local           localhost       public
group   localgroup      v1              local
group   localgroup      v2c             local
view    all    included   .1    80
access  localgroup      “”      any     noauth  exact   all     all none
pass . /usr/bin/ucd5820stat

[root@desktop225 ~]# /etc/init.d/snmpd restart
Stopping snmpd:                                            [FAILED]
Starting snmpd:                                            [  OK  ]

[root@desktop225 ~]#  snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
IP-MIB::ipAdEntIfIndex. = INTEGER: 1
IP-MIB::ipAdEntIfIndex. = INTEGER: 3
IP-MIB::ipAdEntIfIndex. = INTEGER: 4

make sure EPEL repo is enabled.
[root@desktop225 repofiles]# yum install cacti -y

[root@desktop225 ~]# rpm -ql cacti | grep cacti.sql

[root@desktop225 ~]# mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8a/cacti.sql
Enter password:
[root@desktop225 ~]#

[root@desktop225 ~]# vim /etc/cacti/db.php
/* make sure these values refect your actual database/host/user/password */
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cacti”;
$database_password = “redhat”;
$database_port = “3306”;
$database_ssl = false;

[root@desktop225 ~]# vim /etc/httpd/conf.d/cacti.conf

Alias /cacti    /usr/share/cacti
Allow from

[root@desktop225 ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@desktop225 ~]#

[root@desktop225 ~]# cat /etc/cron.d/cacti
*/2 * * * *    cacti    /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

Access cacti:-

and login with admin username and password”admin”.


About bpn4it

Feel Free in Linux. Bipin Patel Ahmadabad, Gujarat, India
This entry was posted in Bipin hands-on. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s