1. Install the system dependency package and build lamp environment
[email protected] ~]# Yum install rrdtool net-snmp net-snmp-libs net-snmp-utils-y
[email protected] ~]# yum install httpd php php-mysql php-snmp php-xml php-gd mysql-server mysql-y
[Email protected] ~]# vim/etc/httpd/conf/httpd.conf
ServerName localhost
DirectoryIndex index.php index.html Index.html.var
AddType application/x-httpd-php. php
[Email protected] ~]#/etc/init.d/httpd restart
stopping httpd: [OK]
Starting httpd: [OK]
[Email protected] ~]# vim/var/www/html/index.php
<?php
Phpinfo ();
?>
[Email protected] ~]#
Test:
650) this.width=650; "title=" 1.jpg "alt=" wkiol1ucq8vwpkxzaasbx88kjfc343.jpg "src=" http://s3.51cto.com/wyfs02/M01/ 5c/33/wkiol1ucq8vwpkxzaasbx88kjfc343.jpg "/>
2. Installing the Cacti monitoring software
[Email protected] ~]# wget http://www.cacti.net/downloads/cacti-0.8.8c.tar.gz
[Email protected] ~]# tar xvf cacti-0.8.8c.tar.gz
[Email protected] ~]# MV Cacti-0.8.8c/var/www/html/cacti
[Email protected] ~]# cd/var/www/html
[Email protected] html]# chown-r Apache:apache cacti/
[Email protected] html]# mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server Version:5.6.21-log MySQL Community Server (GPL)
Copyright (c), the Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql> Grant all privileges the cacti.* to [email protected]' localhost ' identified by ' system ';
Query OK, 0 rows affected (0.01 sec)
mysql> flush Privileges;
mysql> CREATE database cacti;
mysql> \u Cacti
Mysql> Source/var/www/html/cacti/cacti.sql;
Mysql> exit
Bye
[Email protected] html]# vim cacti/include/config.php
$database _type = "MySQL";
$database _default = "cacti"; --Specify Database
$database _hostname = "localhost"; --Database Server host
$database _username = "cacti"; --User name
$database _password = "System"; --Password
$database _port = "3306"; --Port
$database _ssl = false;
[[email protected] html]# crontab-e--rrdtool Drawing
*/5 * * * */usr/bin/php/var/www/html/cacti/poller.php >/dev/null 2>&1
[Email protected] html]#/etc/init.d/crond restart
stopping Crond: [OK]
Starting Crond: [OK]
[Email protected] html]#/etc/init.d/httpd restart
stopping httpd: [OK]
Starting httpd: [OK]
[Email protected] html]#
3. Testing
650) this.width=650; "title=" 2.jpg "style=" Float:none; "alt=" wkiol1ucsapzeiojaauit4i3soy733.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/5c/34/wkiol1ucsapzeiojaauit4i3soy733.jpg "/>
650) this.width=650; "title=" 3.jpg "style=" Float:none; "alt=" wkiom1ucsgxy3adyaakm8gnbbdy187.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/5c/39/wkiom1ucsgxy3adyaakm8gnbbdy187.jpg "/>
650) this.width=650; "title=" 4.jpg "style=" Float:none; "alt=" wkiol1ucsatjiszjaamt9suqbj0797.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/5c/34/wkiol1ucsatjiszjaamt9suqbj0797.jpg "/>
Password at the beginning: admin
650) this.width=650; "title=" 5.jpg "style=" Float:none; "alt=" wkiol1ucsasdoameaai-cyveyvk810.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/5c/34/wkiol1ucsasdoameaai-cyveyvk810.jpg "/>
Change Password: System
650) this.width=650; "title=" 6.jpg "style=" Float:none; "alt=" wkiom1ucsgbqrrpcaajqoyjmvds842.jpg "src=" http:/ S3.51cto.com/wyfs02/m00/5c/39/wkiom1ucsgbqrrpcaajqoyjmvds842.jpg "/>
650) this.width=650; "title=" 7.jpg "style=" Float:none; "alt=" wkiol1ucsaxx8gckaaoo7ve-nj0160.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/5c/34/wkiol1ucsaxx8gckaaoo7ve-nj0160.jpg "/>
This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1627590
Installation of monitoring software cacti