[[email protected] ~]# iptables –f[[email protected] ~]# setenforce 0[ [Email protected] ~]# mkdir /mnt/sr0/[[email protected] ~]# mount /dev /cdrom/mnt/sr0/[[email protected] ~]# yum -y install httpd[[email protected ] ~]# yum -y install mysqlmysql-server mysql-devel[[email protected] ~ ]# yum -y install phpphp-mysql[[email protected] ~]# yum -y Install zlibfreetype libjpeg fontconfig libxml2 gd php-gd[[email protected] ~]# yum -y install rrdtool[[email protected] ~]# yum -y Install net-snmpnet-snmp-utils change the disc into the system [[email protected] ~]# cd /mnt/sr0/[[email Protected] sr0]# lscacti cgilib-0.5.tar.gz rrdtool-1.4.5.tar.gzcacti-plugin cpuburn-in.tar.gz[[email protected] sr0]# cd cacti[[email protected] cacti]# cpcacti-0.8.7g.tar.gz /usr/src/[[email protected] cacti]# cd /usr/src/[[email protected] src]# tar -zxfcacti-0.8.7g.tar.gz[[email protected] src]# mv cacti-0.8.7g/var/www/html/cacti [[email protected] ~]# Service httpd restart[[email protected] ~]# service mysqld restart[[email protected] src]# service snmpd restart[[email protected] src]# cd/var /www/html/cacti/[[email protected] cacti]# viinclude/config.php #查看一下配置文件信息, can be modified or do not change $database_type = "MySQL"; $database _default = "Cacti"; $database _hostname = "localhost"; $database _username = "Cacti"; #修改用户 $database_password = "123456", #修改密码 $database _port = "3306"; [[email protected] cacti]# mysql #进入数据库mysql > create database cacti; # Create a cacti database query ok, 1 row affected (0.00 sec) Mysql> grant all on cacti.* [email protected] ' localhost ' identified by ' 123456 '; #授权一个刚刚建立的用户, to be consistent with the modified user query ok, 0 rows affected (0.01 SEC)
mysql> flush Privileges; #刷新一下Query OK, 0 rows affected (0.01 sec) [[email protected] cacti]# mysql-u cacti-pcacti < Cacti.sql #导入数据库Enter Password:[[email protected] cacti]# useradd cacti #执行安装仙人掌和管理的用户
Installation
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/DB/wKiom1Wrb1jSbcirAAPgypN_IEE372.jpg "title=" QQ picture 20150622002316.png "alt=" Wkiom1wrb1jsbciraapgypn_iee372.jpg "/>
New Installation or upgrade, we are a new installation
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/D8/wKioL1WrcgqCWuugAAFDj16necw123.jpg "title=" QQ picture 20150622002528.png "alt=" Wkiol1wrcgqcwuugaafdj16necw123.jpg "/>
Installation information, if there is no red warning can proceed to the next step, the bottom of the red can not be used to control him
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/DB/wKiom1WrcE7gVm14AAKsbx3XCvs261.jpg "title=" QQ picture 20150622002657.png "alt=" Wkiom1wrce7gvm14aaksbx3xcvs261.jpg "/>
Install successful login, default password and user are admin
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/D8/wKioL1Wrck_CPk-PAAFkyFgT_Co974.jpg "title=" QQ picture 20150622002845.png "alt=" Wkiol1wrck_cpk-paafkyfgt_co974.jpg "/>
Login entry will allow you to change the default password
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/D8/wKioL1WrcnDjIAAzAAFvyDYI3-E167.jpg "title=" QQ picture 20150622003033.png "alt=" Wkiol1wrcndjiaazaafvydyi3-e167.jpg "/>
A successful change will open the Cactus's desktop
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1WrcKuwzNzmAAJBVwFUD3I954.jpg "title=" 1.png " alt= "Wkiom1wrckuwznzmaajbvwfud3i954.jpg"/>
Open a host to simulate monitored data
The client configuration requires an SNMP protocol so the client has to install it .
[[email protected] ~]# iptables –f[[email protected] ~]# setenforce 0[ [email protected] ~]# yum -y install net-snmpnet-snmp-utils[[email protected] ~]# vi /etc/snmp/snmpd.conf # Modify the SNMP configuration file to submit data to the server 41 com2sec notconfiguser 192.168.16.11 public123 #11是服务器的IP, after the authentication between and server, cannot be the same as the default value, Both sides must be the same, this side changed the server over there also to be modified. 62 access notconfiggroup "" any noauth exact all none none# default query operation, SystemView change to all85 view all included .1 80# whether to allow other SNMP query [[Email protected] ~]# service snmpd restart Add a test
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1WrcPfAB1C9AALMUVh1Gas275.jpg "title=" QQ picture 20150622004845.jpg "alt=" Wkiom1wrcpfab1c9aalmuvh1gas275.jpg "/>
Edit the test machine information, click on the next frame of the create
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/DC/wKiom1WrdVKAltehAAMAeil4HIM588.jpg "title=" QQ picture 20150622005206.jpg "alt=" Wkiom1wrdvkaltehaamaeil4him588.jpg "/>
If you can see the data below, it means the data is connected successfully.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/D9/wKioL1Wrd0-TTjmyAAHN6mWzKxU991.jpg "title=" QQ picture 20150622005611.png "alt=" Wkiol1wrd0-ttjmyaahn6mwzkxu991.jpg "/>
Pull down and we can see what we can monitor.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/D8/wKioL1WrdC7S6n2yAAOwfscxTZ8499.jpg "title=" QQ picture 20150622010610.png "alt=" Wkiol1wrdc7s6n2yaaowfscxtz8499.jpg "/>
add two additional monitoring items, you can click on the bottom right corner after adding a good save saves the added content
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1WrcouCgaq8AAP14R7HAzw633.jpg "title=" QQ picture 20150622010835.png "alt=" Wkiom1wrcoucgaq8aap14r7hazw633.jpg "/>
Save it and we'll do the build.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1WrdZHjVifwAAGzVkrru3k001.jpg "title=" QQ picture 20150622011037.png "alt=" Wkiom1wrdzhjvifwaagzvkrru3k001.jpg "/>
Set up the monitoring content according to your own requirements
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/DC/wKiom1WrdjPwF-DcAAUzzTvc-wY253.jpg "title=" QQ picture 20150622011508.png "alt=" Wkiom1wrdjpwf-dcaauzztvc-wy253.jpg "/>
set it up and click on the bottom right corner of the Create, upper left corner if there is a message that adds success
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/D9/wKioL1WreD6gCwhGAABoBzTVGHI819.jpg "title=" QQ picture 20150622011732.png "alt=" Wkiol1wred6gcwhgaabobztvghi819.jpg "/>
Add a genus Group
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6F/D9/wKioL1WreG_SPWEnAAHICqqm0cs305.jpg "title=" QQ picture 20150622012055.png "alt=" Wkiol1wreg_spwenaahicqqm0cs305.jpg "/>
Add a test machine
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1WrdzvCQDYFAAJ2CcXenMM931.jpg "title=" QQ picture 20150622012622.png "alt=" Wkiom1wrdzvcqdyfaaj2ccxenmm931.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6F/DC/wKiom1Wrd1igXfD_AAKPBrkzYe4707.jpg "title=" QQ picture 20150622012905.png "alt=" Wkiom1wrd1igxfd_aakpbrkzye4707.jpg "/>
Click Create will see one more host, save, go to graphs view our new group found nothing in our monitoring console. We need to do some configuration
On the server:
[[email protected] cacti]# chown root:root *[[email protected] cacti]# chown cacti:cactilog[[email protected] cacti]# Chow n cacti:cactirra[[email protected] cacti]# su cacti[[email protected] cacti]$ php/var/www/html/cacti/poller.php #添加功能 Refresh
Test: Copy the data in the disc into the system to see the operation. in the graphs under new group
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6F/DC/wKiom1Wrd4OwWnXfAAItEvnI0uo347.jpg "title=" QQ picture 20150719172628.jpg "alt=" Wkiom1wrd4owwnxfaaitevni0uo347.jpg "/>
This article is from the "stand in the Cloud" blog, be sure to keep this source http://9827789.blog.51cto.com/9817789/1676117
Use cacti to do the monitoring server has been configured