centos6:
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
yum install zabbix-agent -y
sed -i 's/Server=127.0.0.1/Server=zabbix.xxxxx.net/g' /etc/zabbix/zabbix_agentd.conf
chkconfig zabbix-agent on
service zabbix-agent start
centos7:
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/7/x86_64/zabbix-release-2.2-1.el7.noarch.rpm
yum install zabbix-agent -y
sed -i 's/Server=127.0.0.1/Server=zabbix.xxxxx.net/g' /etc/zabbix/zabbix_agentd.conf
chkconfig zabbix-agent on
service zabbix-agent start