首页 > 其他 > 详细

Cacti监控软件的安装

时间:2014-08-08 18:34:27      阅读:432      评论:0      收藏:0      [点我收藏+]

Install and Configure Cacti

1.Required Packages for RPM-based Operating Systems

yum -y install cairo-devel libxml2-devel pango-devel php-mysql mysql-devel php-snmp php-xml net-snmp-utils net-snmp

2.install rrdtool

[root@cacti ~]# cd rrdtool-1.4.7

[root@cacti rrdtool-1.4.7]# ./configure --prefix=/usr/local/rrdtool

[root@cacti rrdtool-1.4.7]# make && make install

[root@cacti rrdtool-1.4.7]# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/

3.Create cacti os user 

shell>mkdir /home/cacti

shell> useradd -r -s /sbin/nolog -h /home/cacti cacit

shell>chown cacti:cacti /home/cacti

4.Extract the distribution tarball. Untar to the DOCUMENT_ROOT of your web server

shell> tar -xzvf cacti.tar.gz

5.Create the MySQL database:

shell> mysqladmin --user=root create cacti

6.Import the default cacti database:

shell> mysql cacti < cacti.sql

7.Optional: Create a MySQL username and password for Cacti.

shell> mysql --user=root mysql

mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘somepassword‘;

mysql> flush privileges

8.Edit “include/config.php” and specify the database type, name, host, user and password for your Cacti configuration.

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "localhost";

$database_username = "cactiuser";

$database_password = "cacti";

$url_path = "/";

9.Configure the privileges of rra and log:

shell> chown -R cacti:cacti rra/ log/

10.Configure snmp.conf

修改com2sec notConfigUser default public为:

com2sec notConfigUser 10.0.1.0/24(根据实际情况修改) public

修改access notConfigGroup ""      any       noauth    exact systemview none none,为

access notConfigGroup ""      any       noauth    exact all    none none

修改#view all    included .1 80为

view all    included .1 80

重启snmp服务:service snmpd restart

执行命令验证:snmpwalk -v 2c -c public your_remote_ip if 

11.Configure httpd.conf

cat /etc/httpd/conf.d/cacti.conf

Listen 8888

NameVirtualHost *:8888


<VirtualHost *:8888>

  DocumentRoot /usr/local/cacti

ServerName *

ErrorLog /usr/local/cacti/log/mycacti_err.log

CustomLog logs/mycacti.log common

</VirtualHost>

启动httpd服务:service httpd restart

12.Add a line to your ”/etc/crontab” file similar to1):

crontab -e -u cacti

*/5 * * * * /usr/bin/php /user/local/cacti/poller.php > /dev/null 2>&1

13.访问http://ip:7777/,至此Cacti安装完成.



本文出自 “webseven” 博客,请务必保留此出处http://webseven.blog.51cto.com/4388012/1537434

Cacti监控软件的安装,布布扣,bubuko.com

Cacti监控软件的安装

原文:http://webseven.blog.51cto.com/4388012/1537434

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!