Cacti(系统监控)
Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具。
注:中文版安装扩展插件时不成功(我是没做成),建议使用英文版(已做成)
下载地址:http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rrdtool-1.2.18-1.el5.rf.i386.rpm (32
位)
http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-rrdtool-1.2.18-1.el5.rf.i386.rpm
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rrdtool-1.2.18-1.el5.rf.x86_64.rpm (64位)
http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/perl-rrdtool-1.2.18-1.el5.rf.x86_64.rpm
http://blogimg.chinaunix.net/blog/upfile2/080822131839.gz (汉化版)
http://www.cacti.net/downloads/cacti-0.8.7b.tar.gz (英文版)
# rpm - ivh /media/cdrom/Server/lm_sensors-2.10.0-3.1.i386.rpm
# rpm - ivh /media/cdrom/Server/net-snmp-5.3.1-14.e15.i386.rpm
# rpm -ivh /media/cdrom/Server/net-snmp-utils-5.3.1-14.e15.i386.rpm
# rpm - ivh /media/cdrom/Server/fontconfig-2.4.1-7.el5.i386.rpm
# rpm - ivh /media/cdrom/Server/freetype-devel-2.2.1-20.el5_2.i386.rpm
# rpm - ivh /media/cdrom/Server/fontconfig-devel-2.4.1-7.el5.i386.rpm
# rpm - ivh /media/cdrom/Server/fonts-chinese-3.02-12.el5.noarch.rpm
# rpm -ivh perl-rrdtool-1.2.18-1.el5.rf.i386.rpm --nodeps
# rpm -ivh rrdtool-1.2.18-1.el5.rf.i386.rpm
# cd /var/www/html
# tar zxf /root/cacti-0.8.7b.tar.gz
# mv cacti-0.8.7b cacti
# useradd cactiuser
# chown -R cactiuser.cactiuser cacti/rra cacti/log
# mysql -u root -p
密码
> create database cacti default character set utf8;
> grant all on cacti.* to cactiuser@localhost identified by '123456';
> quit
# mysql -u cactiuser -p cacti < cacti/cacti.sql
# cd cacti/include
# vi config.php
<? php
$ database_type = "mysql";
$ database_default = "cacti";
$ database_hostname = "localhost";
$ database_username = "cactiuser";
$ database_password = "123456";
$ database_port = "3306";
?>
浏览器:http://192.168.1.2(网关ip)
cacti安装向导界面 - 下一步 - 全新安装(php路径为/usr/local/php/bin/php) - 完成
# /usr/local/php/bin/php /var/www/html/cacti/poller.php
# crontab - e
*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php & > /dev/null
# service crond start
# chkconfig --level 35 crond on
用户名密码默认均为admin,第一次会让修改密码
注:中文版登录后需要设置字体,cacti - 控制面板 - 设置 - 路径 - RRDtool默认字体路径 -
/usr/share/fonts/chinese/TrueType/ukai.ttf