下载源码包
wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.0/zabbix-2.2.0.tar.gz
添加用户
#creater zabbix user
useradd zabbix
解压\安装
#Extract zabbix tar bag
tar zxvf zabbix-2.2.0.tar.gz
cd zabbix-2.2.0
#安装
./configure --prefix=/usr/local/zabbix --enable-agent
make
make install
mkdir /var/log/zabbix
chown zabbix.zabbix /var/log/zabbix
cp misc/init.d/debian/zabbix-agent /etc/init.d/
#修改安装路径及做相应的软连接
sed -i "s#DAEMON=/usr/local#DAEMON=/usr/local/zabbix#g" /etc/init.d/zabbix-agent
mkdir /etc/zabbix
ln -s /usr/local/zabbix/etc/* /etc/zabbix/
ln -s /usr/local/zabbix/bin/* /usr/bin/
ln -s /usr/local/zabbix/sbin/* /usr/sbin/
#设置开启的端口
cat >> /etc/services << EOF
#add zabbix useing port
zabbix-agent 10050/tcp #Zabbix Agent
zabbix-agent 10050/udp #Zabbix Agen