Install cacti monitoring in centos6.5 (1)

Source: Internet
Author: User
Tags rrdtool snmp

1: Install the operating system. You don't need to write a tutorial. (Omitted) I personally use centos6.5 for minimal installation.

Disable firewall and SELinux after installing the system

[[Email protected] ~] # Service iptables stop // disable the Firewall Service

[[Email protected] ~] # Chkconfig iptables off // permanently disable

[[Email protected] ~] # Vi/etc/sysconfig/SELinux // change SELinux = enforcing to SELinux = disabled


2: Yum settings


For more information, see Yum settings in the previous blog.


3: Install software on which cacti depends


[[Email protected] ~] # Yum-y install MySQL mysql-server mysql-devel httpd PHP-pdo php-snmp php-mysql lm_sensors net-snmp-utils net-snmp-libs rrdtool- devel Perl-plrpc Perl-DBI Perl-rrdtool Perl-DBD-MySQL


4: after installing the dependent software, you need to configure SNMP in three places.


[[Email protected] ~] # Vim/etc/snmp/snmpd. confg

Row 41st: Change "default" in com2sec notconfiguser default public to "127.0.0.1"

Row 62nd: Change "systemview" in access notconfiggroup "" any noauth exact systemview none to "all"

Row 85th: remove the # sign before the # view all include. 1 80 line.


5: We will start three important services after configuring SNMP.


[[Email protected] ~] # Service snmpd start // start the SNMP service

[[Email protected] ~] # Chkconfig snmpd on // set startup

[[Email protected] ~] # Service httpd start

[[Email protected] ~] # Chkconfig httpd on

[[Email protected] ~] # Service mysqld start

[[Email protected] ~] # Chkconfig mysqld on


6. install and configure cacti.


[[Email protected] ~] # Wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz // the latest version of cacti Official Website

[[Email protected] ~] # Tar-zxvf cacti-0.8.8b.tar.gz

[[Email protected] ~] # Mv cacti-0.8.8b/var/www/html/cacti // move the cacti-0.8.8b folder to the/var/www/html directory and rename the cacti-0.8.8b to cacti


7. Set the MySQL database


[[Email protected] ~] # Mysql-uroot-P // the newly installed MySQL has no password. Press enter to enter the MySQL database.

Mysql> Create Database cacti; // create a cacti database first. Do not lose a semicolon.

Mysql> grant all privileges on cacti. * to [email protected] identified by 'cacti' with grant option; // create and authorize a cacti user

Mysql> Use cacti;

Mysql> source/var/www/html/cacti. SQL; // import the cacti database file

Mysql> exit


8: Configure cacti


[[Email protected] ~] # Vim/var/www/html/cacti/include/config. php

$ Database_type = "MySQL ";

$ Database_default = "cacti ";

$ Database_hostname = "localhost ";

$ Database_username = "cactiuser"; // because we previously created a "cacti" user in the database, the default "cactiuser" here should be changed to "cacti"

$ Database_password = "cactiuser"; // change the default password to "cacti"

$ Database_port = "3306 ";


9. added the cacti user to write data in the RRD and log directories. Otherwise, the image cannot be generated.


[[Email protected] ~] # Useradd cacti

[[Email protected] ~] # Cd/var/www/html/cacti

[[Email protected] ~] # Chown-r cacti RRA/log/


10: Add a Task Scheduler


The specific time allowed cacti to generate a monitoring chart. Here, the default time of cacti is 5 minutes.

[[Email protected] ~] # Crontab-e

Add this row and save it.

*/5 * PHP/var/www/html/cacti/poller. php>/dev/null 2> & 1


11: restart http: // ip/cacti after configuration, as shown in, next...


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/C2/wKiom1QyXcLzyo3vAAM6zHo2fQw202.jpg "style =" float: none; "Title =" 1.jpg" alt = "wkiom1qyxclzyo3vaam6zho2fqw202.jpg"/>

Choose new install, next...

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/C4/wKioL1QyXffjenPSAAFNpNTF-Rs080.jpg "style =" float: none; "Title =" 2.jpg" alt = "wKioL1QyXffjenPSAAFNpNTF-Rs080.jpg"/>

If there is no red font "not found" in this example, you can click Finish. If yes, you must manually specify the path.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/C2/wKiom1QyXcLDuqhOAATuA6HamJM402.jpg "style =" float: none; "Title =" 3.jpg" alt = "wkiom1qyxclduqhoaatua6hamjm402.jpg"/>

The logon interface of cacti appears after finishing. The default username and password are admin.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/C4/wKioL1QyXffhi0z3AADwdrqn0JI949.jpg "style =" float: none; "Title =" 4.jpg" alt = "wkiol1qyxffhi0z3aadwdrqn0ji949.jpg"/>

After login, cacti requires you to change the password. You can change the password and save it.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/C2/wKiom1QyXcPTOR__AAEE6LxgiSE249.jpg "style =" float: none; "Title =" 5.jpg" alt = "wkiom1qyxcptor1_aaee6lxgise249.jpg"/>

The installation work in the early stage is complete, and then the monitoring configuration is completed.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/C4/wKioL1QyXfixIJQXAALW5i5YnCU818.jpg "style =" float: none; "Title =" 6.jpg" alt = "wkiol1qyxfixijqxaalw5i5yncu818.jpg"/>


This article is from the "share records with you" blog!

Install cacti monitoring in centos6.5 (1)

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.