客户端安装
1.创建zabbix用户和用户组
[root@localhost ~]# groupadd zabbix
[root@localhost ~]# useradd zabbix -g zabbix
2.下载并编译
[root@localhost ~]# wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
[root@localhost ~]# tar zxf zabbix-2.4.5.tar.gz
[root@localhost ~]# cd zabbix-2.4.5
[root@localhost zabbix-2.4.5]# ./configure --prefix=/usr/local/zabbix --enable-agent
[root@localhost zabbix-2.4.5]# make install
3.设置启动脚本
[root@localhost zabbix-2.4.5]# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
[root@localhost zabbix-2.4.5]#sed -i 's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g' /etc/init.d/zabbix_agentd
4.配置zabbix_agentd.conf
[root@localhost zabbix-2.4.5]# vi /usr/local/zabbix/etc/zabbix_agentd.conf
LogFile=/tmp/zabbix_agentd.log
EnableRemoteCommands=0
Server=192.168.0.219
ListenPort=10050
ListenIP=192.168.0.230
StartAgents=8
ServerActive=192.168.0.219
Hostname=Zabbix-agent1
Timeout=30
UnsafeUserParameters=1
5.启动服务并设置开机启动
[root@localhost zabbix-2.4.5]# /etc/init.d/zabbix_agentd start
[root@slave7 spool]# chkconfig zabbix_agentd on
[root@slave7 spool]# ps -ef|grep zabbix_agentd #查看服务是否启动
[root@slave7 spool]# netstat -lnp|grep 10050 #默认是10050端口
tcp 0 0 192.168.0.230:10050 0.0.0.0:* LISTEN 5272/zabbix_agentd