cacti监控 On RHEL6
1. Install required packages # yum -y install httpd php php-mysql php-snmp mysql mysql-server net-snmp 2. Configure MySQL # /etc/init.d/mysqld start # mysqladmin --user=root create cacti mysql>GRANT ALL on cacti.* TO cacti@localhost IDENTIFIED BY ''password''; mydql>flush privileges; 3. Install and Configure Cacti # tar xf cacti-0.8.7g.tar.gz # cp -r cacti-0.8.7g /var/www/html/cacti # cd /var/www/html/cacti # mysql cacti < cacti.sql # vim include/config.php $database_type = "mysql"; # useradd -s /sbin/nologin -M cacti # chown -R cacti.cacti rra/ log/ # crontab -e */5 * * * * cacti php /var/www/html/cacti/poller.php > /dev/null 2>&1 注意:可以手动运行php /var/www/html/cacti/poller.php进行测试会发现有多WARNING: PHP Warning: strtotime(): It is not safe to rely on the system''s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ''Asia/Chongqing'' for ''CST/8.0/no DST'' instead in /var/www/html/cacti/include/global_arrays.php on line 640 解决办法是: # vim /etc/php.ini date.timezone = PRC # /etc/init.d/httpd restart 4. Install and Confiture Spine # yum -y install automake libtool mysql-devel net-snmp-devel # cp /usr/local/spine/etc/spine.conf.dist /usr/local/spine/etc/spine.conf # vi /usr/local/spine/etc/spine.conf DB_Host localhost 5. Install and Configure rrdtool # yum -y install libxml2-devel pango-devel cairo-devel perl-ExtUtils-MakeMaker # tar xf rrdtool-1.4.4.tar.gz # cd rrdtool-1.4.4 # ./configure # make && make install && echo $? 6. Test and Further Configure Use firefox to open the url: http://localhost/cacti
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |