cd /usr/local/src

wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.4/zabbix-2.2.4.tar.gz

tar xf  zabbix-2.2.4.tar.gz

cd zabbix-2.2.4

./configure --prefix=/usr/local/zabbix --with-mysql --with-net-snmp --with-jabber --with-libcurl  --enable-agent

make && make install 

mkdir -p  /var/log/zabbix

chown -R zabbix.zabbix /var/log/zabbix/

vim /usr/local/zabbix/etc/zabbix_agentd.conf

内容如下:

LogFile=/var/log/zabbix/zabbix_agent.log
Server=zabbix-server.ip(或者域名)
ServerActive=zabbix-server.ip(或者域名)
Hostname=agent本机ip


/usr/local/zabbix/sbin/zabbix_agentd  start

netstat  -nplt | grep 10050

ps -ef | grep zabbix


zabbix-2.2.4.tar.gz 的源码包见附件。

报错:

checking for curl-config... no
configure: error: Curl library not found

如果是debian服务器:

apt-get install libcurl4-gnutls-dev

如果是Centos服务器:

yum install libcurl-devel.x86_64 -y