1. Download the installation package
Download link: https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/
2. Installation
#Add zabbix user and set it to not log in
shell > useradd -r -s /sbin/nologin zabbix
#Upload the download package to the Kylin V10 server and unzip it
shell >tarzxf zabbix-3.0.22.tar.gz
shell > cd zabbix-3.0.22
shell > ./configure --prefix=/usr/local/zabbix_agent --enable-agent
shell >make install
3. Configuration
shell >cp /root/zabbix-3.0.22/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/#Copy the startup script
shell >sed -i's#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix_agent#' /etc/init.d/zabbix_agentd #Modify the Agent installation path
shell >vim /usr/local/zabbix_agent/etc/zabbix_agentd.conf#Adjust the configuration file
LogFile=/tmp/zabbix_agentd.log
Server=xxx.xxx.xxx.xxx# Zabbix Server IP (passive mode, client passive)
ServerActive=127.0.0.1#Active mode, if you use it also fill in Zabbix Server IP, you can comment it out if you don’t use it
Hostname=101.201.142.247#Host name Zabbix Server needs to be used when adding a host
Include=/usr/local/zabbix_agent/etc/zabbix_agentd.conf.d/*.conf#Load custom monitoring configuration file
UnsafeUserParameters=1 #Allow custom Key
4. Start
shell > service zabbix_agentd start
shell > chkconfig --add zabbix_agentd
shell > chkconfig --level35zabbix_agentd on
shell> iptables -A INPUT -s'Zabbix Server IP'-p tcp --dport10050-j ACCEPT #Because it is a client passive mode, it is necessary to open the port for Zabbix Server connection
You can use systemctl start/stop/status zabbix_agentd.service to operate zabbix_agent
Author: Liu Feng