一,LAMP
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5 php5-mysql php5-qd php5-cli
sudo apt-get install mysql-server mysql-client phpmyadmin
参考:
二,cacti
sudo apt-get install cacti
参考:
三,使用
http://www.cacti.net/downloads/docs/html/
四,总结问题
1. 安装好后提示找不到spine
apt-get install cacti-spine
刷新一下,ok, file Found
2. 添加一个device出现snmp error
在被监控机器上输入:lsof -i:161 如果监控循环在本地上,则需修改配置文件
vi /etc/default/snmpd.conf
将SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
去掉127.0.0.1
3. 查看rrd文件:
rrdtool fetch yourRRDfile.rrd AVERAGE
4. 如果采集不到数据:
debug一下,rrd文件是否存在,如果不存在,就看有关cacti的属主和权限,90%的可能是这个原因,10%的我还没遇到。。。
比如:cacti_path /usr/share/cacti --安装路径
/var/lib/cacti --rra(rrd) 文件
/var/log/cacti --各种日志文件,如果你在页面上看日志,发现没有,那就是这的问题
5. 使用中文
6.各种参考文档
http://bbs.linuxtone.org/thread-7063-1-1.html
http://www.joecen.com/article/cacti/