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