Cacti Learning Note one: Basic installation and configuration

Source: Internet
Author: User
Tags rrdtool snmp

1. Installing dependent Packages

Yum install net-snmp-devel mysql mysql-devel openssl-devel libtool

2. Installing RRDtool

Yum Install RRDtool

3. Install SNMP

Yum Install Net-snmp net-snmp-utils

4. Install lamp

Yum install httpd mysql-server php php-mysql service httpd startservice mysql start

5. Installing cacti

Download:wgethttp//www.cacti.net/downloads/cacti-0.8.8h.tar.gz   TarXF cacti-0.8.8h.Tar. GZ Create account: Useradd-m cactipasswdCacti Initializing database: Create user'Cacti'@'localhost'Identified by'Cacti';   Create database cacti; Grant all on cacti.* To'Cacti'@'localhost'; CD Cacti-0.8. 8h MySQL-uroot-p Cacti <Cacti.sql If there is no password, go directly to create the RRD account Useradd CactiuserMVcacti-0.8.8h/var/www/html/Cacti CD/var/www/html/CactiChown-R cactiuser RRA log*/5* * * * * root/usr/bin/php/var/www/html/cacti/poller.php >/dev/NULLJoin/etc/crontab occurrence of time security issues, modify PHP.iniDate. TimeZone = Asia/shanghai Remove Comment disease modification

6. Configure cacti

vim/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"; $database _ssl=false;

7. Increased spine, optimized polling

wgethttp//www.cacti.net/downloads/spine/cacti-spine-0.8.8a.tar.gzTar-XVF cacti-spine-0.8.8a.Tar. GZCD Cacti-spine-0.8. 8a./Configure Make&& Make Install    CP/usr/local/spine/etc/spine.conf.dist/usr/local/spine/etc/Spine.confvim/usr/local/spine/etc/spine.conf db_host localhost db_database cacti db_user cacti b_pass cacti Db_po RT3306Db_preg0
Whether the test and database can communicate
Configuring cacti with spine polling

View Logs

Tail-f/var/www/html/cacti/log/cacti.log

Polling method changed from cmd.php to spine

Problems

No data:         -f/var/www/html/cacti/log/Cacti.log If the log appears every 5 minutes, if the scheduled task is not checked if crontab is not supported        , use the script cat /root/ Shell/foreach_cacti. SH          #!/bin/bash        (whiletrue;          do            /usr/bin/php/var/www/html/cacti/poller.php >/dev/null;             Sleep  - ;         done) &

Cacti Learning Note one: Basic installation and configuration

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.