[网络监控]CACTI的安装

admin 发表于 Linux, 网络技术 分类,标签: , ,
0

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/*


发表我的评论

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 

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word