- 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
# 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
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
# 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
# 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
download cacti-0.8.6i.tar.gz in /usr/local/src
# tar xzfv cacti-0.8.6i.tar.gz
# cp -Rf cacti-0.8.6i /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
cacti plug-in
install cacti
install cacti
more specific information about cacti
# 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
download cacti-0.8.6i.tar.gz in /usr/local/src
# tar xzfv cacti-0.8.6i.tar.gz
# cp -Rf cacti-0.8.6i /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
cacti plug-in
install cacti
install cacti
more specific information about cacti
댓글 없음:
댓글 쓰기