cacti(网络流量监测图形分析工具)介绍
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cacti是一套基于PHP,MySQL,SNMP及RRDTool开发的网络流量监测图形分析工具。
【安装方法】
一、安装rrdtool
CentOS-5:
rpm -ivh http://apt.sw.
be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
yum install rrdtool -y
CentOS-6:
rpm -ivh
http://apt.sw. be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm yum install rrdtool -y
二、安装配置net-snmp
1、安装net-snmp
yum install net-snmp net-snmp-libs net-snmp-utils
2、配置net-snmp
修改:
view systemview included .1.3.6.1.2.1.1
为:
view systemview included .1.3.6.1.2.1
3、测试net-snmp
# service snmpd start
# snmpwalk -v 1 -c public localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: Linux cronos 2.4.28 #2 SMP venjan 14 14:12:01 CET 2005 i686 三、安装LAMP
yum install httpdphpphp-mysqlphp-snmpphp-xml php-gdmysqlmysql-server
service httpd start
service mysqld start
mysqladmin -uroot password yourpassword
mysqladmin --user=root --password reload
四、安装cacti
1、下载cacti
cd /tmp
wget http://www.cacti. net/downloads/cacti-0.8.8a.tar.gz
tar xzf cacti-0.8.8a.tar.gz
mv cacti-0.8.8a /var/www/html/cacti
cd /var/www/html/cacti
2、创建数据库
mysqladmin --user=root -p create cacti
3、导入数据库
mysql -uroot -p cacti 4、创建数据库用户 shell>mysql -uroot -p mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactipassword'; mysql> flush privileges; 5、配置include/config.php $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactipassword"; /* load up old style plugins here */ $plugins = array(); //$plugins[] = 'thold'; /* Edit this to point to the default URL of your Cacti install ex: if your cacti install as at http://serverip/cacti/ this would be set to /cacti/ */ $url_path = "/cacti/"; /* Default session name - Session name must contain alpha characters */ #$cacti_session_name = "Cacti"; 6、设置目录权限 chown -R cactiuserrra/ log/ cactiuser为系统存在的用户,为了收集数据。 7、配置计划任务 echo "*/5 * * * * cactiuserphp /var/www/html/cacti/poller.php> /dev/null 2>&1">>/etc/crontab service crond restart 8、完成cacti的安装 1) 在浏览器中输入:http://www.yourdomain. com/cacti/ 默认用户名:admin 密码:admin 2) 更改密码 3)设置cacti用到的命令路径