ret33 发表于 2014-6-12 14:15:59

Cacti搭建实例

环境:
LAMP环境已搭建,可正常提供访问,如图:

配置监控端Server:
安装RRDtool
        #yum -y install cairo-devel libxml2-devel pango-devel perl-devel perl-CPAN         # tar zxvf rrdtool-1.4.5.tar.gz
        # cd rrdtool-1.4.5
        # ./configure --prefix=/usr/local/rrdtool
        # make && make install
        # ln -s /usr/local/rrdtool/bin/* /usr/local/bin/

        安装net-snmp        # yum install net-snmpnet-snmp-devel net-snmp-libs net-snmp-utils                Vi /etc/snmp/snmpd.conf         #41com2secnotConfigUser   127.0.0.1      public         #62accessnotConfigGroup ""      any      noauth    exactall none none         #85viewall    included.1   
        # chkconfig –level 35 snmpd on        # service snmpd start
配置Cacti

        #useradd cacti        #echo “123456” | passwd --stdin cacti         # tar zxvf cacti-0.8.8b.tar.gz        # mv cacti-0.8.8b/usr/local/apache/htdocs/cacti        # chown cacti:cacti log-R         # chown cacti:cacti rra –R
        #mysql -uroot-p         mysql> create database cacti;                 mysql> insert intomysql.user(host,user,password) values ('localhost','cacti',password('123456'));        mysql>flush privileges;        mysql> grant all on cacti.* tocacti@'localhost' identified by '123456';
        # mysql -ucacti -p123456cacti < cacti.sql       \\导入数据库
报错:

        原因:数据库版本兼容性问题        解决方法:        vi /usr/local/apache/htdocs/cacti/cacti.sql

        # mysql -ucacti -p123456cacti < cacti.sql    \\在此导入

编辑vi /usr/local/apache/htdocs/cacti/include/config.php


        编辑global.php文件,添加如下内容:         # vi/usr/local/apache/htdocs/cacti/include/global.php
        PS:Cacti安装完毕默认显示美国时刻

        访问:http://192.168.10.142/cacti        












至此Cacti检测服务器已搭建完毕!!!
页: [1]
查看完整版本: Cacti搭建实例