Cacti install
需要的软件包 cacti
Httpd php php-mysql php-snmp mysql mysql-server
net-snmp net-snmp-utils net-snmp-devel net-snmp-libs
rrdtool
安装rrdtool需要三个软件包
rpm –ivh rrdtool-ver-1.el4.wrl.i386 rrdtool-devel-ver-1.el4.wrl.i386 rrdtool-perl-ver-1.el4.wrl.i386
这三个包要一起装。
tar –zxvf cacti-v.tar.gz –C /var/www/html
进入mysql数据库 执行
Create cacti use cacti
[root@localhost cacti]# mysql cacti < cacti.sql
grant all on cacti.* to cacti@localhost identified by "123456";
flush privileges;
vi /var/www/html/cacti/include/config.php
$database_password = "123456"
Useradd cacti chown –R cacti /var/www/html/cacti/rrd /var/www/html/cacti/log
Crontab –e
*/5 * * * * cacti php /var/www/html/cacti/poller.php > /dev/null 2>&1
snmpd
1、 查找以下字段:
2、 sec.name source community
/etc/init.d/snmpd start
安装cacti 第一步 一个全新的安装 第二部 完成即可
1、安装Plugin 补丁
shell> tar zxvf cacti-plugin-ver-tar.gz -C /var/www/html/cacti
shell> cd /var/www/html/cacti/
shell>cp –R /var/www/html/vavti-pligin/* /var/www/html/cacti
shell> patch -p1 -N < cacti-plugin-arch/cacti-plugin-0.8.7b-PA-v2.1.diff
shell> mysql -u cacti -p cacti < cacti-plugin-arch/pa.sql
注意:cacti-plugin和cacti版本要一致。否则出错
http://youserverip/cacti
utilities----user Management ----you’s admin(你的管理员的账户)
选择plugin Managemet 保存
shell> tar zxvf settings-tar.gz -C /var/www/html/cacti/plugins
shell> tar zxvf thold-tar.gz -C /var/www/html/cacti/plugins
shell> tar zxvf monitor-tar.gz -C /var/www/html/cacti/plugins
shell> cd /var/www/cacti/plugins/
shell> mysql -u cacti -p cacti < thold/thold.sql
shell> mysql -u cacti -p cacti < monitor/monitor.sql
3、config.php配置文件
shell> vi /var/www/html/cacti/include/config.php
添加了这几行
$config[’url_path’] = "/cacti/";
$plugins = array();
$plugins[] = thold;
$plugins[] = monitor;
Configuration中会出现plugin Managemet这个选项。选择自己需要的插件install并且激活enable。
监控win设置
添加删除程序----添加删除程win组建-------管理和监控工具-----简单的网络管理协议(snmp)
设置snmp service 属性代理填写联系人和位置
陷阱----团队名称----snmpd设置的名称 陷阱目标---填写监控服务器的IP
安全----接收团队名称---snmpd设置的名臣 接收来自这些主机的snmp数据包---监控服务器的IP