First, the CentOS can be connected to the SISU network
Find the zabbix-proxy-2.4.7 package on Zabbix's website and copy the link to a CentOS directory when downloading. Like the/opt.
cd/opt wget Download Compressed package link, download directly
Can clone sessions while building a basic environment for CentOS
Yum Groupinstall "Development tools"-Y
Yum Install Wget-y
wget https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.2-full.tar.gz--no-check-certificate
1. Install MySQL
Yum Install mysql*
Or install the XAMPP integrated environment directly
2. Go to MySQL
#/mysql-u root-p (Direct enter, skip password)
3. Create a Database
Mysql>create database Zabbix default CharSet UTF8;
Exit
4. Install the extension
#yum install-y Net-snmp Curl curl-devel net-snmp net-snmp-devel perl-dbi libxml libxml2-devel (It doesn't matter)
5. Download the zabbix-proxy-2.4.7 compression pack
Cd/opt
wget Download the zip package link
6. Unzip and go to the Zabbix folder
CD/OPT (compressed package under/OPT, unzip here)
TAR-ZXVF zabbix-proxy-2.4.7.tar.gz
CD zabbix-2.4.7
7. Import the Database
#cd/opt/zabbix-2.4.4/database/mysql/
#cat Schema.sql | Mysql-uroot-p Zabbix (Direct enter, skip password)
8. Go to the folder where the files need to be compiled, configure needs to be compiled. Typically under an uncompressed installation package, under the installation package, compile the
cd/opt/zabbix-2.4.7 (Compile directory/usr/local/zabbix_proxy, you can set it yourself)
./configure--prefix=/usr/local/zabbix_proxy--enable-agent--enable-proxy--with-mysql=mysql_config--enable-ipv6- -WITH-NET-SNMP--with-libcurl--WITH-LIBXML2 (compiled to/usr/local/zabbix_proxy)
9.make Install
cd/opt/zabbix-2.4.7
Make && make install
10. Create a user
#groupadd Zabbix
#useradd-G zabbix-s/sbin/nologin Zabbix
11. Create a service
#echo "zabbix-agent 10050/tcp #Zabbix agent" >>/etc/services
#echo "zabbix-agent 10050/udp #Zabbix agent" >>/etc/services
#echo "Zabbix-trapper 10051/tcp #Zabbix Trapper" >>/etc/services
#echo "Zabbix-trapper 10051/udp #Zabbix Trapper" >>/etc/services
12. Modify the Proxy.conf file (under compilation directory)
#vi/usr/local/zabbix_proxy/etc/zabbix_proxy.conf
! Server address
server=192.168.0.1
! Host Name
hostname=proxy175
! Database name
Dbname=zabbix
! Database user Name
Dbuser=root
! MySQL's socket location
Dbsocket=/var/lib/mysql/mysql.sock
! How long to synchronize once.
Configfrequency=60
! Add fping
Fpinglocation=/usr/local/sbin/fping
13. Modify the Agentd.conf file
#vi/usr/local/zabbix_proxy/etc/zabbix_agentd.conf (under Compile directory)
The newly added below
! Native IP address, not srver.
server=202.206.32.175
! Native IP Address
serveractive=202.206.32.175
! Consistent with the host name in the configuration file of the previous proxy
hostname=proxy175
14. Manual Start
#/usr/local/zabbix_proxy/sbin/zabbix_proxy-c/usr/local/zabbix_proxy/etc/zabbix_proxy.conf
#/usr/local/zabbix_proxy/sbin/zabbix_agentd-c/usr/local/zabbix_proxy/etc/zabbix_agentd.con
15. Turn off the firewall
Service Iptables Stop
Note:
! Add fping
Fpinglocation=/usr/local/sbin/fping (default installation path)
(need to install fping)
Download the fping-3.10 Package
1. Download
#wget http://202.206.32.226/H%20LinuxSoftwares/fping-3.10.tar.gz (path not necessarily, can also be uploaded)
2. Unzip
Cd/opt
#tar-ZXVF fping-3.10.tar.gz
#cd/opt/fping-3.10
3. Compiling
#cd/opt/fping-3.10
#./configure (directly compiled into this directory)
4.make Install
#cd/opt/fping-3.10
#make && make Install
5. Default installation/usr/local/sbin/fping
6. Modify permissions do not 777
#chown root:root/usr/local/sbin/fping
#chmod u+s/usr/local/sbin/fping
7. Testing
Test to see if icmpping can be used, you can use the command directly on the server
Fping XX. Xx. Xx. XX (native IP address)
If you return XX. Xx. Xx. XX is alive, that means it's OK.
8. Modify the Zabbx_server.conf file
Note: zabbix-2.4.7.tar.gz and fping-3.10.tar.gz I put under the/opt.
This article is from the "12271750" blog, please be sure to keep this source http://12281750.blog.51cto.com/12271750/1871700
Installation of Zabbix-proxy