cacti on centos 6

http://www.cyberciti.biz/faq/fedora-rhel-install-cacti-monitoring-rrd-software/

http://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/

 

 

 

[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
Bye

[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 .1.3.6.1.4.1.4413.4.1 /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.127.0.0.1 = INTEGER: 1
IP-MIB::ipAdEntIfIndex.192.168.0.225 = INTEGER: 3
IP-MIB::ipAdEntIfIndex.192.168.122.1 = INTEGER: 4

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

[root@desktop225 ~]# rpm -ql cacti | grep cacti.sql
/usr/share/doc/cacti-0.8.8a/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 192.168.0.0/24

[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:-
http://your.example.com/cacti/

and login with admin username and password”admin”.

Advertisements

About bpn4it

Feel Free in Linux. Bipin Patel bpn4it@gmail.com 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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s