首页 > 代码库 > rrdtool cacti
rrdtool cacti
准备工具:
rrdtool:http://oss.oetiker.ch/rrdtool/pub/(rrdtool-1.4.8.tar.gz)
yum安装httpd mysql php:yum install httpd php php-mysql mysql mysql-server
snmp:www.net-snmp.org/下载 (net-snmp-5.7.2.1.zip)
cacti:http://www.cacti.net/ (cacti-0.8.8b.zip)
关闭selinux
*在安装rrdtoo软件会出现错误安装不上,可能需要把以下组件安装:
yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
rrdtool安装步骤:
tar -zxvf rrdtool-1.4.8.tar.gz
cd rrdtool-1.4.8
./configure --prefix=/usr/local/rrdtool/
make
make install
cd /usr/local/rrdtool/bin;cp * /usr/local/bin
net-snmp安装步骤:
unzip net-snmp-5.7.2.1.zip
cd net-snmp-5.7.2.1
./configure --prefix=/usr/local/snmpd
*安装过程会提示安装路径,我执行的是/usr/local/snmpd/
make
make install
cacti安装步骤:
tar -zxvf cacti-0.8.8b.zip
unzip cacti-0.8.8b.zip
mv cacti-0.8.8b cacti
mv cacti /var/www/html/
然后在mysql新建数据库信息:
create database cacti;
grant on all privileges on cacti.* to cactiuser@localhost identified by ‘cacriuser‘;
mysql -uroot -p cacti<cacti.sql 导入cacti数据库文件
chown -R root rra/ log/ 给这两个文件权限
crontab -e
*/5 * * * * /usr/local/bin/php /home/wwwroot/cacti/poller.php > /dev/null 2>&1
计划任务
http://IP/cacti 进行登录访问,默认为admin/cacti
本文出自 “大王好帅” 博客,转载请与作者联系!
rrdtool cacti