首页 » Linux, 网络技术 » [网络监控]CACTI的安装

[网络监控]CACTI的安装

refdgfff

 

由于MRTG还比较初级,软件作者写了RRDTOOL这个功能强大的软件,而CACTI就是工作在RRDTOOL之上的网络监控软件,他的管理功能强大,插件众多,也拥有众多的用户。

今天来试一下吧,

软件名称:CACTI(中文名:仙人掌)
官方网站http://www.cacti.net

安装过程:

1.Cacti的安装需要LAMP运行环境,当然其他的Web Server也可以,然后安装net-snmp和rrd-tools

2.创建Cacti数据库并赋权
进入MySQL
>create database cacti;
>grant all privileges on cacti.* to cactiuser@localhost identified by “password”;
>flush privileges;

2.解压cacti安装包,复制到/var/www/html/下
创建cactiuser,给rra和log文件夹更改属主。
[root@centmini cacti]# useradd cactiuser
[root@centmini cacti]# chown -R cactiuser log/ rra/

3.导入数据
[root@centmini ~]# cd /var/www/html/cacti/
[root@centmini cacti]# mysql -p cacti<cacti.sql

4.修改include/config.php
$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”;
$database_password = “123456″;
$database_port = “3306″;

5.添加计划任务
# vi /etc/crontab

*/5 * * * * cactiuser /usr/local/php/bin/php /var/www/html/cacti/poller.php >/dev/null 2>&1

6.打开IE,输入http://192.168.0.2/cacti进行安装!

后记

1.出现错误:configure: error: C++ preprocessor “/lib/cpp” fails sanity check
出现该情况是由于c++编译器的相关package没有安装,以root用户登陆,在终端上执行
# yum install gcc-c++

2.rrdtool-1.0.50版本,不用安装支持库文件,1.2.x 版的rrdtool繪圖不再使用GD,而使用libart及freetype等功能
推荐新手使用1.0.50版本

3.出现错误snmpwalk Binary Path   file not found
确认是否安装yum install net-snmp-utils

4.出现大量file not found
使用yum安装的程序位置为/usr/bin/*

, ,

目前这篇文章还没有评论(Rss)

我要评论

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

*
请输入图片中的字符以验证你并非垃圾机器人. 点击图片收听验证码的语音版.
点击这里收听此验证码的语音版本