First, install the epel-release extension source
[Email protected] ~]# RPM-IVH epel-release-6-8_32.noarch.rpm
Second, install lamp environment
[[email protected] ~]# yum-y install httpd php php-mysql mysql mysql-server mysql-devel php-gd libjpeg libjpeg-devel LIBP Ng Libpng-devel
Third, install cacti, NET-SNMP, RRDtool, PHP-SNMP
[Email protected] ~]# yum-y install cacti net-snmp net-snmp-utils rrdtool php-snmp
Iv. Start-up service
[[email protected] ~]#/etc/init.d/mysqld start
[[email protected] ~]#/etc/init.d/httpd start
[[email protected] ~]#/ETC/INIT.D/SNMPD start
V. Configuration cacti
1. Initialize the database
[Email protected] ~]# mysql_secure_installation
[Email protected] ~]# mysql-uroot-p
2, Configuration httpd
<ifmodule!mod_authz_core.c>
# httpd 2.2
Order Deny,allow
From all
% allow from localhost
</IfModule>
[Email protected] ~]#/etc/init.d/httpd restart
stopping httpd: [OK]
Starting httpd: [OK]
3. Create a cacti database
[Email protected] ~]# mysql-uroot-p-E "CREATE database Cacti"
4. Create Cacti Database users
[Email protected] ~]# mysql-uroot-p-E "Grant all on cacti.* to ' cacti ' @ ' 127.0.0.1 ' identified by ' cacti ';"
5. Import Database files
[Email protected] ~]# mysql-uroot-p cacti </usr/share/doc/cacti-0.8.8b/cacti.sql
6. Configuring the Cacti configuration file
[Email protected] ~]# vim/usr/share/cacti/include/config.php
$database _type = "MySQL";
$database _default = "cacti";
$database _hostname = "127.0.0.1";
$database _username = "cacti";
$database _password = "cacti";
$database _port = "3306";
$database _ssl = false;
7. Access Cacti and install
(1) http://192.168.1.21/cacti/install,Next---->new Install---->next
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/79/55/wKioL1aOaPvS5d5fAADzq5FNy88876.jpg "title=" 1.jpg " alt= "Wkiol1aoapvs5d5faadzq5fny88876.jpg"/>650) this.width=650; src= http://s4.51cto.com/wyfs02/M02/79/56/ Wkiom1aoauuxo-ytaadlof7mq-g385.jpg "title=" 3.jpg "alt=" Wkiom1aoauuxo-ytaadlof7mq-g385.jpg "/>
(2) Keep the default <finish>, go to the login page, the default login name and password are admin, input will prompt to change the password
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M01/79/55/wKioL1aOalHxikdOAABLSQaT_KE047.jpg "title=" 4.jpg " alt= "Wkiol1aoalhxikdoaablsqat_ke047.jpg"/>
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/56/wKiom1aOanDCowyrAACalSZOkVU430.jpg "title=" 5.jpg " alt= "Wkiom1aoandcowyraacalszokvu430.jpg"/>
(3) Perform poller.php, generate graphs, and join scheduled tasks
[Email protected] ~]#/usr/bin/php/usr/share/cacti/poller.php
Date.timezone error, modify php.ini related configuration
[Email protected] ~]# Vim/etc/php.ini
947 date.timezone = ' asia/chongqing '
[Email protected] ~]#/usr/bin/php/usr/share/cacti/poller.php
[Email protected] ~]# CRONTAB-E
*/5 * * * */usr/bin/php/usr/share/cacti/poller.php//every 5 minutes
(4) View cacti Generate graphics information
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/79/57/wKiom1aOcLvwkl6MAAUj5G8v65o967.jpg "title=" 6.jpg " alt= "Wkiom1aoclvwkl6maauj5g8v65o967.jpg"/>
Viii. Cacti adding client monitoring
1, installation Net-snmp
[Email protected] ~]# yum-y install NET-SNMP
2, modify the snmp-conf
[Email protected] ~]# vim/etc/snmp/snmpd.conf
162 Syslocation 192.168.1.251
163 syscontact Root [email protected]
View SystemView included. 1.3.6.1.2.1
View SystemView included. 1.3.6.1.2.1.25.1.1
[[email protected] ~]#/ETC/INIT.D/SNMPD start
3, add the configuration on the server side
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/79/55/wKioL1aOdrXDCblgAAD7WtehpXs517.jpg "title=" 7.jpg " alt= "Wkiol1aodrxdcblgaad7wtehpxs517.jpg"/>
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/79/55/wKioL1aOd3OD5iv-AAF7oeKk9uA543.jpg "title=" 8.jpg " alt= "Wkiol1aod3od5iv-aaf7oekk9ua543.jpg"/>
* Create Graphs for this Host
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/79/57/wKiom1aOfGXANwAfAAE_T2v_zgA980.jpg "title=" 9.jpg " alt= "Wkiom1aofgxanwafaae_t2v_zga980.jpg"/>
Graph Trees (add client Host)
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/79/57/wKiom1aOfPrDSlCvAAEyvasrORQ418.jpg "title=" 10.jpg "alt=" Wkiom1aofprdslcvaaeyvasrorq418.jpg "/>
"Cacti" Linux monitoring software Installation and configuration (i)