CentOS installation Cacti

Source: Internet
Author: User
Tags rrdtool snmp

Virtual machine Address 192.168.24.69,

The three files in the attachment can be uploaded to the root folder using the SSH file tool to facilitate subsequent operation

First, the installation of the necessary software
(1) Install APACHE+PHP+GD Web Environment on the main monitor machine, recommend compiling and installing, and install it directly with Yum.

#yum install-y php php-mysql php-snmp mysql mysql-server net-snmp net-snmp-libs net-snmp-utils php-pdo Perl-DBD-MySQL
(2) Installing Rrdtool,rrdtool on the main monitor is too heavy, so choose Add Source, then install with Yum

#yum install-y RRDtool rrdtool-devel rrdtool-php

(3) Configuring SNMP

#vi/etc/snmp/snmpd.conf

#service snmpd Start
#service mysqld Start

#加入开机启动

#chkconfig SNMPD on

#chkconfig--level 345 mysqld on


(4) Installation cacti
#把解压后的包移动到你的相应的web目录

#tar XVF cacti-0.8.7g.tar.gz
#mv Cacti-0.8.7g/var/www/html/cacti

(5) Building libraries, authorizing, and importing database structures in the database
#注意导入cacti. SQL when the path to the file

#mysql-P
mysql> CREATE database cacti;
Mysql> Grant all privileges the cacti.* to [e-mail protected] identified by ' cacti ' with GRANT option;
Mysql> Grant all privileges the cacti.* to [e-mail protected] identified by ' cacti ' with GRANT option;
mysql> use cacti;
Mysql> Source/var/www/html/cacti/cacti.sql;
#配置cacti以连接数据库, primarily modify the user and password for the connection database

#vi/var/www/html/cacti/include/config.php

#启动httpd开启web服务

#service httpd Start

#加入开机启动

#chkconfig--level 345 httpd on

(6) Browser Open Http://192.168.24.69/cacti

#如果遇到403fobidden, turn off SELinux services

No reboot is required, but it will be executed again after reboot

#setenforce 0

or modify config directly to set SELinux to disable and restart

#vi/etc/selinux/config

    • Click 2 times on the first visit to finish (make sure all the paths in the page are file Found),
    • The default login account password is admin
    • You will be prompted to change your password after login

(7) Increase into a scheduled task, so that cacti every five minutes to generate a monitoring chart.
#crontab-E
# Add the following content. Note the path of the poller.php
*/5 * * * * php/var/www/html/cacti/poller.php >/dev/null 2>&1

# Make sure the/var/www/html/cacti/rra/directory exists
# If you don't see the chart for the time being, you can do it manually and generate the chart
#php/var/www/html/cacti/poller.php >/dev/null 2>&1

Second, cacti common plug-in installation

#先安装patch命令工具

#yum Install patch

#tar XVF cacti-plugin-0.8.7g-pa-v2.8.tar.gz
#cp-R cacti-plugin-arch/*/var/www/html/cacti/
#cd/var/www/html/cacti/

#mysql-ucacti-pcacti Cacti < Pa.sql
#patch-p1-n < Cacti-plugin-0.8.7g-pa-v2.8.diff

#vi include/config.php
Modified to $url_path = "/cacti/";

Third, install monitor monitoring plug-in

Monitor:http://docs.cacti.net/plugin:monitor

#tar ZXVF monitor-latest.tgz
#mv monitor//var/www/html/cacti/plugins/monitor

You can see monitor in the navigation bar when you open it.

Iv. installation of MySQL monitoring

(1)

#tar ZXVF better-cacti-templates-1.1.8.tar.gz
#cd better-cacti-templates-1.1.8

#cp scripts/ss_get_mysql_stats.php/var/www/html/cacti/scripts/Modify ss_get_myqsl_stats.php#vi/var/www/html/cacti/ scripts/ss_get_mysql_stats.php

(2) Configure the MySQL server so that cacti machine can access the MySQL server status information, must have "process" permission. If you want to monitor the InnoDB status, you must also have "SUPER" permissions.

Mysql> Grant Process,super on * * to ' cacti ' @ '% ' identified by ' cacti ';
Mysql> grant all privileges on cacti.* to [email protected] '% ' identified by ' cacti ';

(3) Import templates in the browser

(4) Add templates in Console->device->localhost

Save by Save

(5) at the top of the page, click Create Graphs for this host

(6) You can see the MySQL monitor diagram in graphs (wait a minute for the data to come out)

References, in personal practice, found some errors in reference materials that have been corrected in this article

http://foreveryan.blog.51cto.com/3508502/671274

Attachment Download: https://app.yinxiang.com/shard/s41/res/6d7e088b-faf5-4345-8358-621df8362e91/cacti-0.8.7g.tar.gzhttps:// app.yinxiang.com/shard/s41/res/bd2ed818-ebb9-46b1-9917-a4f2b818db6c/cacti-plugin-0.8.7g-pa-v2.8.tar.gzhttps:// App.yinxiang.com/shard/s41/res/1ed398ad-38fd-4192-a77c-87a475fa6790/monitor-v1.2-1.tgzhttps://app.yinxiang.com /shard/s41/res/27e42b8c-1345-466b-9060-59ae34a5a200/better-cacti-templates-1.1.8.tar.gz

CentOS installation Cacti

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.