Install cacti in yum under CentOS 6

Source: Internet
Author: User
Tags rrdtool

Brief description: It was originally compiled and installed. Because there are too many library files associated during the compilation process, the installation files must be sequential and there are too many errors. When rrdtool is started, it says that everything cannot be installed, due to time issues, I chose yum for installation. for compilation and installation, this is much simpler. She automatically installed all the associated files, saving a lot of trouble, the following describes how to install yum:
First, deploy the yum environment. There are many yum sources in China, such as sohu, 163, and HKUST. The configuration is very simple. You can check the configuration on the Internet.
Deployment environment: (LAMP + RRDTool + snmp + cacti)

1. Configure the LAMP Environment
① Install Mysql
# Yum-y install mysql-server mysql-devel
② Install Apache
# Yum-y install httpd
③ Install PHP
# Yum-y install php-mysql
④ Start the service and add it to the startup list
# Service httpd start
# Service mysqld start
# Chkconfig httpd on
# Chkconfig mysqld on
Ii. Install the required library files
# Yum-y install zlib
# Yum-y install zlib
# Yum-y install freetype
# Yum-y install libjpeg
# Yum-y install fontconfig
# Yum-y install gd
# Yum-y install libxml2
# Yum-y install php-gd
3. Install RRDTool
# Yum-y install rrdtool
Start rrdtool and add it to the startup list
# Service rrdcached start
# Chkconfig rrdcached on
4. Install the snmp support tool
# Yum-y install net-snmp
# Yum-y install net-snmp-utils
Start the snmpd service and add it to the startup list
# Service snmpd start
# Chkconfig snmpd on
5. Install cacti (cacit Official Website: http://www.cacti.net /)

① Download
# Wget http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz
② Configuration
Decompress the package and put it in the apache document directory (/var/www/html)
# Tar-xf cacti-0.8.7e.tar.gz
# Music cacti-0.8.7e/var/www/html/cacti
Edit the CentOS cacti configuration file and the username, password, and port used to connect to the MySQL service.
# Cd/var/www/html
# Vi cacti/include/config. php
$ Database_type = "mysql ";
$ Database_default = "cacti ";
$ Database_hostname = "localhost ";
$ Database_username = "cacti ";
$ Database_password = "cacti ";
$ Database_port = 3306 ″;
③ Add a scheduled task (so that cacti obtains data every 5 minutes)
Add a cacti user and add a cron task:
# Useradd cacti
# Su cacti
# Crontab-e
*/1 *****/usr/bin/php/var/www/html/cacti/poller. php>/dev/null 2> & 1
④ Change Group
Change the group of the cacti website directory to cacti.
# Su root
# Chgrp-R cacti/var/www/html/cacti
# Chown-R cacti/var/www/html/cacti/rra
# Chown-R cacti/var/www/html/cacti/log
# Chown-R cacti/var/www/html/cacti/poller. php
Vi. Database Configuration

① Create a cacti Database
# Mysql
Msyql> create database cacti;
② Import cacti. SQL
# Mysql-u root-p cacti </var/www/html/cacti. SQL
Enter a password. If you do not have a password, press Enter.
③ Application
Mysql> use cacti
Mysql> grant all on cacti. * to cacti @ localhost identified by 'cacti ';
Mysql> flush privileges;
Mysql> exit
7. WEB login cacti
① Http: // ip/cacti
(If the error "403 forbidden" appears, disable selinux)
Open the webpage-> next-> select new install and press Enter.
The user name is admin and the password is admin (the password is changed when the first login is successful)
8. Chinese-based cacti (if the English language is not good, you can convert the cacti into Chinese, which makes it easy to understand)
① Download
Wget http://blogimg.chinaunix.net/blog/upfile2/090815172648.gz

② Configuration
Tar zxvf 90815172648.gz
Rm-rf/var/www/html/cacti
Music cacti-0.8.7e-cn-utf8 // var/www/cacti/html
Vi/var/www/cacti/html/include/config. php
The content is as follows:
$ Database_type = "mysql ";
$ Database_default = "cacti ";
$ Database_hostname = "localhost ";
$ Database_username = "cacti ";
$ Database_password = "cacti ";
$ Database_port = "3306 ";
Chown-R cacti/var/www/html/cacti/rra/var/www/html/cacti/log

③ Upgrade
Http: // ip/cacti
Select the "upgrade from 0.8.x" option, and then follow the prompts.
Login, Username: admin, password you have changed before, if not changed, it is still admin.
Now that the Chinese version is complete, configure your own applications!
Bytes ------------------------------------------------------------------------------------------------------------------
Due to limited technology, there is nothing wrong with the installation and configuration process, or something is missing. Thank you for your advice!
------------------------------------------------ Dapeng ------------------------------------------------------------
This article is from Dapeng's day blog

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.