cd /tmp&&tar -zxvf zabbix-3.4.15.tar.gz&&yum -y install pcre*&&useradd zabbix -s /sbin/nologin
cd /tmp/zabbix-3.4.15&&./configure --prefix=/usr/local/zabbix_agent --enable-agent && make && make install
cp /tmp/zabbix-3.4.15/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd
sed -i ‘s\BASEDIR=/usr/local\BASEDIR=/usr/local/zabbix_agent\g’ /etc/init.d/zabbix_agentd;
sed -i ‘s\Server=127.0.0.1\Server=0.0.0.0/0\g’ /usr/local/zabbix_agent/etc/zabbix_agentd.conf;
sed -i ‘s\ServerActive=127.0.0.1\ServerActive=0.0.0.0/0\g’ /usr/local/zabbix_agent/etc/zabbix_agentd.conf;
chkconfig --add zabbix_agentd&&chkconfig zabbix_agentd on&&service zabbix_agentd start