Installing and configuring Cacti in CentOS-6.0

Source: Internet
Author: User
Tags rrdtool import database

The content is basically the same, mainly to record some problems encountered during the installation process and some places different from the original text, for later
1. install Apache + PHP + MySQL + Net-SNMP + RRDTool (MySQL installation, Apache installation, and PHP installation). This article uses the YUM command to install all cacti dependent software. The process is as follows:
# Yum install mysql-server mysql-devel php-mysql httpd php-pdo lm_sensors net-snmp-devel openssl-devel php-snmp net-snmp-utils perl- net-Daemon perl-PlRPC perl-DBI rrdtool perl-DBD-MySQL net-snmp-libs
To install cacti-spine, you need to use these packages. net-snmp-devel mysql-devel openssl-devel
2. Configure SNMP
# Vi/etc/snmp. conf (original)
# Vi/etc/snmp/snmpd. conf (actual)
Change the default value in the following line to 127.0.0.1.
Com2sec notConfigUser default public
Com2sec notConfigUser 127.0.0.1 public
Change systemview in the following line to all
Access notConfigGroup "" any noauth exact systemview none
Access notConfigGroup "" any noauth exact all none
Remove the comment "#" in the following line
# View all supported ded. 1 80
View all supported ded. 1 80

Start the snmpd/httpd/mysql Service
# Service snmpd start
# Service httpd start
# Service mysqld start
3. Download cacti:
# Wget http://www.cacti.net/downloads/cacti-0.8.7g.tar.gz
# Tar-zvxf cacti-0.8.7g.tar.gz
# Music cacti-0.8.7g/var/www/html/cacti

4. Create, authorize, and import database structures in the database
# Mysql-u root
Mysql> create database cacti;
Mysql> grant all privileges on cacti. * to cacti @ localhost identified by 'cacti' with grant option;
Mysql> grant all privileges on cacti. * to cacti@127.0.0.1 identified by 'cacti' with grant option;
Mysql> use cacti;
Mysql> source/var/www/html/cacti. SQL;
Configure cacti to connect to the database
# Vi/var/www/html/cacti/include/config. php
$ Database_type = "mysql ";
$ Database_default = "cacti ";
$ Database_hostname = "localhost ";
$ Database_username = "cacti ";
$ Database_password = "cacti ";
$ Database_port = "3306 ";
5. Add a cacti user. Otherwise, cacti cannot be written to the rrd and log directories, and images cannot be generated.
# Useradd cacti-d/var/www/html/cacti-s/bin/false
# Chown-R cacti/var/www/html/cacti/rra/var/www/html/cacti/log
6. Add a scheduled task so that cacti generates a Monitoring Chart every two minutes. Note the poller. php path.
# Crontab-e
*/2 ***** php/var/www/html/cacti/poller. php>/dev/null 2> & 1
7. Complete the final cacti configuration and enter http: // localhost/cacti in the browser.

Related Article

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.