Cacti plug-in some installation summary
http://liyaoyi.blog.51cto.com/442933/846891
First, prepare the required packages
Apache http://www.apache.org/Mysql http://www.mysql.com/Php Http://www.php.netRrdtool http://oss.oetike R.CH/RRDTOOL/NET-SNMP http://www.net-snmp.org/Cacti http://www.cacti.net/where Apache, MySQL, and PHP are installed via Yum
second, the installation of the necessary software
1.
Installing lamp[[email protected] ~]# yum-y install httpd mysql-server php php-mysql mysql-devel[[email protected] ~]# chkconfig httpd o N[[email protected] ~]# chkconfig mysqld on[[email protected] ~]#/etc/init.d/httpd start[[email protected] ~]#/etc/init. D/mysqld start installation is complete, the following program can be tested [[email protected] html]# cat Inex.php<?phpphpinfo (); >
2.
Installing RRDtoolRRDtool installation requires Cairo, LIBXML2, Pango Library support, can be installed via yum [[email protected] ~]# yum-y install cairo-devel libxml2-devel pango-devel[ [Email protected] ~]# tar zxvf rrdtool-1.4.7.tar.tar[[email protected] ~]# CD Rrdtool-1.4.7[[email protected] rrdtool-1.4 .7]#./configure--prefix=/usr/local/rrdtool[[email protected] rrdtool-1.4.7]# make && make Install[[email Protected] rrdtool-1.4.7]# ln-s/usr/local/rrdtool/bin/*/usr/local/bin/
3.
Installing NET-SNMP[[Email protected] ~]# tar zxvf net-snmp-5.6.1.1.tar.gz[[email protected] ~]# CD Net-snmp-5.6.1.1[[email protected] Net-s nmp-5.6.1.1]#./configure--prefix=/usr/local/net-snmp[[email protected] net-snmp-5.6.1.1]# make && make Install[[email protected] net-snmp-5.6.1.1]# CP example.conf/etc/snmpd.conf[[email protected] ~]# ln-s/usr/local/ net-snmp/bin/*/usr/local/bin/[[email protected] ~]# vim/etc/snmpd.confrocommunity public localhost #去掉注释 [email Protected] ~]#/usr/local/net-snmp/sbin/snmpd-c/etc/snmpd.conf join boot [[email protected] ~]# echo "/usr/local/net-snmp /sbin/snmpd-c/etc/snmpd.conf ">>/etc/rc.local
4.
Installing cacti[[email protected] ~]# tar zxvf cacti-0.8.7i-pia-3.1.tar.gz[[email protected] ~]# mv cacti-0.8.7i-PIA-3.1/* /var/www/html/#将cacti中的内容移到 web directory [[email protected] ~]# chown-r apache:apache/var/www/html/[[email Protected] ~]# mysql-uroot #连接到mysql创建数据库mysql > CREATE database cacti; #创建cacti数据库mysql > INSERT INTO Mysql.user (Host,user,password) VALUES (' localhost ', ' cacti ', password (' cacti123 ')); #建立用户cacti, password cacti123mysql> Flush privileges; #重载mysql授权表mysql > Grant all on cacti.* to [email protected] ' localhost ' identified by ' cacti123 ' ; #把数据库cacti授权于用户cacti [[email protected] ~]# cd/var/www/html/[[email protected] html]# mysql-ucacti- pcacti123 Cacti<cacti.sql #将cacti数据库导入修改网站配置文件, use the correct connection database parameter [[email protected] html]# vim include/config.php$ Database_type = "MySQL"; $database _default = "cacti"; $database _hostname = "localhost"; $database _username = "cacti"; $ Database_password = "cacti123"; $database _port = "3306"; Open with browser http://192.168.209.130/Install/will see the Installation wizard, after two next, the following appears: Default username and password admin, first login will require password change
5.
Set Cacti
data collection Polling time[[email protected] ~]# CRONTAB–E*/5 * * * * env lang=c/usr/bin/php/var/www/html/poller.php
three, common plug-in installationThe latest version of cacti-0.8.7i-pia-3.1 integrates the plugin architecture extension, so you can install additional plugins to open "Console"-----"when you open it directly
User Management "
---"Admin "--" Realm Permissions ", select the following, save the" save "
The "Configuration" in the "console" will then see a
Monitor
Install (graphically display device status)[[Email protected] ~]# tar zxvf monitor-v1.3-1.tgz[[email protected] ~]# mv Monitor/var/www/html/plugins/[[email Protect ED] ~]# Cd/var/www/html/plugins/monitor/[[email protected] monitor]# mysql-ucacti–pcacti123 cacti< Monitor.sql Open cacti Web page "
Plugin ManagementThe Activate plugin
Setting
installation (for mail alerts)[[Email protected] ~]# tar zxvf settings-v0.71-1.tgz[[email protected] ~]# mv settings/var/www/html/ Plugins Open cacti Web page "
Plugin Management"Activate plugin to open" console "-----" Settings "to find the following
Thold
installation (for equipment anomaly warning, threshold alarm)[[Email protected] ~]# tar zxvf thold-v0.4.9-3.tgz[[email protected] ~]# mv thold/var/www/html/plugins/open cacti Web page "
Plugin ManagementThe Activate plugin
Cacti
Polling timeCacti The default polling time is 5 minutes, you can download the time by installing spine: HTTP://CACTI.NET/SPINE_DOWNLOAD.PHP1. Install spine[[email protected] ~]# tar zxvf Cacti-spine-0.8.7i.tar.gz[[email protected] ~]# CD Cacti-spine-0.8.7i[[email protected] cacti-spine-0.8.7i]#. Configure--prefix=/usr/local/cacti-spine--with-snmp=/usr/local/net-snmp/[[email protected] cacti-spine-0.8.7i]# Make && make Install[[email protected] cacti-spine-0.8.7i]# Cd/usr/local/cacti-spine/etc/[[email protected] etc]# CP spine.conf.dist Spine.conf[[email protected] etc]# vim spine.confdb_host localhostdb_database cactidb_user Cactidb_pass cacti123db_port 3306db_preg 0 here to modify the corresponding MySQL user name and password, as well as the connection parameters to open "console"----"Settings"----"Paths" Fill in the path of the spine, and then "save" 2. Select polling mode to open the console----settings----"Poller"---"Save" to add "per minute" traffic view to open the "console"---"
Data Templates"--" interface-traffic "other templates to make corresponding changes. Finally, modify the crontab in the
* * * * * env lang=c/usr/bin/php/var/www/html/poller.php>/dev/null 2>&1
Cacti and Nagios Some summary of "five"