Monitoring and safe operation 1.2 cacti installation

Source: Internet
Author: User
Tags rrdtool snmp

---restore content starts---

First, install Cacti server

1. First install the EPM extension source

RPM-IVH http://www.lishiming.net/data/attachment/forum/epel-release-6-8_64.noarch.rpm

Centos5

32-bit Epel Source: www.lishiming.net/data/attachment/forum/epel-release-5-4_32.noarch.rpm
64-bit: www.lishiming.net/data/attachment/forum/epel-release-5-4_64.noarch.rpm

Centos6
32-bit Epel yum Source: www.lishiming.net/data/attachment/forum/epel-release-6-8_32.noarch.rpm
64-bit: www.lishiming.net/data/attachment/forum/epel-release-6-8_64.noarch.rpm

2. (lamp) then install httpd, PHP, MySQL separately

Yum install-y  httpd php php-mysql mysql mysql-server mysql-devel php-gd libjpeg libjpeg-devel  libpng Libpng-devel

3. Install cacti NET-SNMP RRDtool

Yum install-y cacti  net-snmp  net-snmp-utils  RRDtool

4. Start the service:

/etc/init.d/mysqld start/etc/init.d/httpd  start/etc/init.d/snmpd start

5. Edit the httpd configuration file

vim/etc/httpd/conf.d/cacti.conf   change "Denyfrom all" to  "  allow from all "
/ETC/INIT.D/HTTPD  Restart

6. Import data Create cacti Library

Mysql-uroot  "Create database cacti"

Create cacti User

" Grant all on cacti.* to ' cacti ' @ ' 127.0.0.1 ' identified by ' cacti '; "

Import SQL file

Mysql-uroot Cacti </usr/share/doc/cacti-0.8. 8b/cacti.sql

7. Edit the cacti configuration file

vim/usr/share/cacti/include/config.php  

The changes are as follows:
$database _type = "MySQL";
$database _default = "cacti";
$database _hostname = "127.0.0.1";
$database _username = "cacti";
$database _password = "cacti";
$database _port = "3306";
$database _ssl = false;

8. Web Access cacti and installation
http://ip/cacti/
Click "Next" and "Finish" at two.
Enter Admin Admin login, reset new password

9. Execute poller.php, generate graphics, join scheduled Tasks

/usr/bin/php/usr/share/cacti/poller.php

Add Cron Task

Warning Search timezone Add a row

Vim/etc/php.ini
' asia/chongqing '
/usr/bin/php/usr/share/cacti/poller.php

Increase

Perform scheduled tasks every five minutes

Crontab-e
*/5 * * * *  /usr/bin/php/usr/share/cacti/poller.php

Monitoring and secure operation 1.2 cacti installation

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.