How to install Cacti in Centos6.7

Source: Internet
Author: User

How to install Cacti in Centos6.7

1. Basic Environment Installation

[root@Cacti ~]# yum install -y gcc httpd php php-mysql php-snmp mysql mysql-devel mysql-server rrdtool[root@Cacti ~]# yum install -y net-snmp net-snmp-devel net-snmp-utils wget ntp[root@Cacti ~]# chkconfig ntpd on[root@Cacti ~]# /etc/init.d/ntpd start[root@Cacti ~]# sed -i "s@;date.timezone =@date.timezone = Asia/Chongqing@g" /etc/php.ini[root@Cacti ~]# /etc/init.d/mysqld start[root@Cacti ~]# chkconfig mysqld on[root@Cacti ~]# mysql -uroot -pEnter password: mysql> create database cacti;mysql> create user cactiuser@localhost identified by 'cactiuser';mysql> grant all on cacti.* to cactiuser@localhost;mysql> flush privileges;

Ii. cacti Configuration

[root@Cacti ~]# cd /usr/local/src/[root@Cacti src]# tar zxf cacti-0.8.8f.tar.gz[root@Cacti src]# cp -rf cacti-0.8.8f /var/www/html/cacti[root@Cacti src]# cd cacti-0.8.8f[root@Cacti cacti-0.8.8f]# mysql -h localhost -u cactiuser -p cacti<cacti.sql[root@Cacti ~]# vi /var/www/html/cacti/include/config.php<?php$database_type = "mysql";$database_default = "cacti";$database_hostname = "localhost";$database_username = "cactiuser";$database_password = "cactiuser";$database_port = "3306";$database_ssl = false;?>[root@Cacti ~]# crontab -e*/1 * * * * php /var/www/html/cacti/poller.php >/dev/null[root@Cacti ~]# chkconfig httpd on[root@Cacti ~]# /etc/init.d/httpd start

Iii. snmp service configuration

[root@Cacti ~]# cat /etc/snmp/snmpd.conf |grep -v -E '^#|^$'com2sec notConfigUser default publicgroup notConfigGroup v1 notConfigUsergroup notConfigGroup v2c notConfigUserview systemview included .1.3.6.1.2.1.1view systemview included .1.3.6.1.2.1.25.1.1view systemview included .1.3.6.1.2.1.2access notConfigGroup "" any noauth exact systemview none nonesyslocation Unknown (edit /etc/snmp/snmpd.conf)syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)dontLogTCPWrappersConnects yes[root@Cacti ~]# chkconfig snmpd on[root@Cacti ~]# /etc/init.d/snmpd start

4. Install the polling plug-in spine

[root@Cacti src]# tar zxf cacti-spine-0.8.8f.tar.gz[root@Cacti src]# cd cacti-spine-0.8.8f[root@Cacti cacti-spine-0.8.8f]# ./configure[root@Cacti cacti-spine-0.8.8f]# make && make install[root@Cacti cacti-spine-0.8.8f]# cp -rf /usr/local/spine/etc/spine.conf.dist /etc/spine.conf[root@Cacti cacti-spine-0.8.8f]# ln -s /usr/local/spine/bin/spine /usr/bin/[root@Cacti ~]# vi /etc/spine.conf DB_Host localhostDB_Database cactiDB_User cactiuserDB_Pass cactiuserDB_Port 3306

V. cacti extension plug-in Installation

[root@Cacti src]# wget http://docs.cacti.net/_media/plugin:monitor-v1.3-1.tgz -O monitor-v1.3-1.tgz[root@Cacti src]# tar zxf monitor-v1.3-1.tgz[root@Cacti src]# mv monitor /var/www/html/cacti/plugins/[root@Cacti src]# wget http://docs.cacti.net/_media/plugin:clog-v1.7-1.tgz -O clog-v1.7-1.tgz[root@Cacti src]# tar zxf clog-v1.7-1.tgz[root@Cacti src]# mv clog /var/www/html/cacti/plugins/[root@Cacti src]# wget http://docs.cacti.net/_media/plugin:settings-v0.71-1.tgz -O settings-v0.71-1.tgz[root@Cacti src]# tar zxf settings-v0.71-1.tgz[root@Cacti src]# mv settings /var/www/html/cacti/plugins/[root@Cacti src]# wget http://docs.cacti.net/_media/plugin:thold-v0.5.0.tgz -O thold-v0.5.0.tgz[root@Cacti src]# tar zxf thold-v0.5.0.tgz[root@Cacti src]# mv thold /var/www/html/cacti/plugins/

Installation is complete !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.