Linux cacti installation configuration and simple monitoring example

Source: Internet
Author: User
Tags apache php rrdtool snmp create database import database


First, Introduction

Cacti is a set of graphical analysis tools for network traffic monitoring based on PHP,MYSQL,SNMP and RRDtool development.

Second, the installation

Installation Environment: CentOS6.0 32bit

1, installation of related packages:

Yum install http* mysql* php-* net-snmp* httpd gcc glibc glibc-common gd gd-devel php php-gd ntp-y
Yum Install RRDtool rrdtool-devel rrdtool-php-y

2, download cacti

wget http://www.cacti.net/downloads/cacti-0.8.7h.tar.gz
Tar zxvf cacti-0.8.7i.tar.gz
MV Cacti-0.8.7i/var/www/html/cacti

3, create cacti database, authorization, import Database

Mysql-p
mysql> CREATE database cacti;
Mysql> grant all privileges in cacti.* to ' cactiuser ' @ ' localhost ' identified by ' cactiuser ';
Mysql> grant all privileges in cacti.* to ' cactiuser ' @ ' 127.0.0.1 ' identified by ' cactiuser ';
mysql> flush Privileges;
mysql> use cacti;
Mysql> Source/var/www/html/cacti/cacti.sql;

4, modify the cacti configuration file:

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

5, modify RRA, log directory permissions:

chmod 777/var/www/html/cacti/rra/var/www/html/cacti/log
Chown Apache.apache/var/www/html/cacti-r

6, set the timing task to generate cacti monitoring image:

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

7, browser configuration installation cacti:


Make sure the relevant files are found:

The default account password is admin:

The first login cacti will force the user to modify the password:

Cacti interface:

Configure SNMP:

Restart SNMP after configuration is complete:
Service SNMPD Restart

Check to see if SNMP is configured successfully:
Snmpwalk-c public-v 2c 127.0.0.1

Finally log on to the Web, click on the top right corner of graph to see the monitor image of the computer:

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.