Required software(s)
- MySQL server : Store cacti data.
- NET-SNMP server : SNMP(Simple Network Management Protocol) is a protocol used for network management.
- PHP with net-snmp module : Access SNMP data using PHP.
- RRDTOOL(round robin database tool)
- Apache / lighttpd / nginx webserver : Web server to display graphs created with PHP and RRDTOOL.
Install the software
Configure MySQL server
# mysql -u root -p
Enter password: **********
mysql> create database cacti;
mysql> use mysql;
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'password';
mysql> FLUSH privileges;
mysql> quit
Install snmpd
# yum install net-snmp-utils php-snmp net-snmp-libs
# vi /etc/snmp/snmpd.conf
------------> append <----------------
.
.
com2sec local localhost public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
view all included .1 80
access MyRWGroup "" any noauth exact all all none
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
------------------------------------
# /etc/init.d/snmpd start
# chkconfig snmpd on
# snmpwalk -v 1 -c public localhost IP-MIB::ipAdEntIfIndex
(output)
IP-MIB::ipAdEntIfIndex.your.ip.address = INTEGER: 2
IP_MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
Install cacti
# cd /usr/local/src
# wget http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# cp -Rf cacti-0.8.7g /usr/local/cacti/
# ln -s /usr/local/cacti/ /usr/local/apache/htdocs/cacti
# vi /usr/local/cacti/include/config.php
--------------->modify<------------------
#database_type = "mysql";
#database_default = "cacti";
$database_hostname = "127.0.0.1";
$database_username = "cacti";
$database_password = "password";
$database_port = "3306";
------------------------------------------
# mysql -u root -p cacti < /usr/local/cacti/cacti.sql
Configure crond
# crontab -e
-------------->append<----------------
*/5 * * * * php /usr/local/cacti/poller.php > /dev/null 2>&1
----------------------------------------
# service crond restart
Install cacti web console
go to http://your.ip.address/cacti/
click 'Next'
choose 'New Install' and click 'Next'
if all of Path is [FOUND], click 'Finish'
if you show "[NOT FOUND] PHP Binary Path", install php-cli
# yum install php-cli
Username: admin
Password: admin
reference site
more specific information about cacti
'Server-Side > Linux' 카테고리의 다른 글
[cacti] how to install cacti PIA on CentOS 5.X 64bit (0) | 2010.12.18 |
---|---|
[cacti] ERROR: Cannot connect to MySQL server on 'localhost'. (0) | 2010.12.18 |
[rrdtool] how to install rrdtool on CentOS 5.X 64bit (0) | 2010.12.18 |
[CentOS] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (0) | 2010.12.01 |
linux mount (0) | 2010.12.01 |