系统环境 RHEL6.0 cacti-0.8.7g rrdtool-1.4.4 cacti-plugin-0.8.7g-PA-v2.8 cacti-spine-0.8.7g
# yum -y install httpd mysql mysql-server mysql-devel php php-mysql php-snmp net-snmp net-snmp-utils net-snmp-libs net-snmp-devel libart_lgpl-devel libpng-devel freetype-devel cairo-devel pango-devel gcc libxml2-devel perl-devel automake libtool
# vim /etc/snmp/snmpd.conf
com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 public
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
com2sec local localhost public
com2sec mynetwork 192.168.0.0/24 public
syslocation Linux6.
syscontact Vivek G Gite
dontLogTCPWrappersConnects yes
# /etc/init.d/snmpd restart
# /etc/init.d/mysqld restart
# /etc/init.d/httpd restart
# tar xf rrdtool-1.4.4.tar.gz
# cd rrdtool-1.4.4
# ./configure && make && make install
# ln -s /opt/rrdtool-1.4.4/bin/rrdtool /usr/local/bin/
# tar xf cacti-0.8.7g.tar.gz -C /var/www/html/
# cd /var/www/html/
# mv cacti-0.8.7g/ cacti
# useradd cacti
# cd cacti/
# chown -R cacti rra log
# mysqladmin create cacti
# mysql cacti < cacti.sql
# mysql
mysql> grant all on cacti.* to cacti@localhost identified by 'cacti';
mysql> flush privileges;
mysql> quit
vim include/config.php
$database_username = "cacti";
$database_password = "cacti";
#crontab -u cacti -e
*/5 * * * * php /var/www/html/cacti/poller.php
注:此处需要等待一会儿,如果手动运行 php /var/www/html/cacti/poller.php 出错的华,请修改 vim /etc/php.ini date.timezone = PRC
就可以访问cacti的图形管理界面了,输入默认的用户名密码admin admin 后会强制要求修改密码,然后进入系统
# tar xf cacti-spine-0.8.7g.tar.gz
# cd cacti-spine-0.8.7g
# aclocal
# libtoolize --force
# autoheader
# autoconf
# automake
# ./configure && make && make install 如果有错误出现,请安装完缺失软件,然后重新编译
# cd /usr/local/spine/etc/
# cp spine.conf.dist spine.conf
# vim spine.conf
DB_Host localhost
DB_Database cacti
DB_User cacti
DB_Pass cacti
DB_Port 3306
DB_PreG 0
现在重新访问
Console-Configuration-Settings-Paths-Spine Poller File Path
[/usr/local/spine/bin/spine]
Console-Configuration-Settings-Poller-Poller Type
spine
可以添加一个管理插件
# tar xf cacti-plugin-0.8.7g-PA-v2.8.tar.gz
# cd cacti-plugin-arch/
# mysql -ucacti -pcacti cacti < pa.sql
# cp cacti-plugin-0.8.7g-PA-v2.8.diff /var/www/html/cacti/
# patch -p1 -N < cacti-plugin-0.8.7g-PA-v2.8.diff
# setenforce 0 (关掉selinux,要不访问会出现白屏)
# vim /var/www/html/cacti/include/config.php
$url_path = "/cacti/";
Console-Utilities-User Management-admin-Realm Permissions-点上Plugin Management
添加几个有用的插件
# tar xf settings-0.5.tar.gz -C /var/www/html/cacti/plugins
# tar xf monitor-0.8.2.tar.gz -C /var/www/html/cacti/plugins
# tar xf thold-0.4.3.tar.gz -C /var/www/html/cacti/plugins
开启一下插件功能Console-Configuration-Plugin Management
Console-Configuration-Utilities-User Management-admin-点上View Monitoring
阅读(1785) | 评论(0) | 转发(0) |