客户端安装
1.创建zabbix用户和用户组
[[email protected] ~]# groupadd zabbix
[[email protected] ~]# useradd zabbix -g zabbix
2.下载并编译
[[email protected] ~]# wget http://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
[[email protected] ~]# tar zxf zabbix-2.4.5.tar.gz
[[email protected] ~]# cd zabbix-2.4.5
[[email protected] zabbix-2.4.5]# ./configure --prefix=/usr/local/zabbix --enable-agent
[[email protected] zabbix-2.4.5]# make install
3.设置启动脚本
[[email protected] zabbix-2.4.5]# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
[[email protected] zabbix-2.4.5]#sed -i ‘s/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g‘ /etc/init.d/zabbix_agentd
4.配置zabbix_agentd.conf
[[email protected] 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.启动服务并设置开机启动
[[email protected] zabbix-2.4.5]# /etc/init.d/zabbix_agentd start
[[email protected] spool]# chkconfig zabbix_agentd on
[[email protected] spool]# ps -ef|grep zabbix_agentd #查看服务是否启动
[[email protected] spool]# netstat -lnp|grep 10050 #默认是10050端口
tcp 0 0 192.168.0.230:10050 0.0.0.0:* LISTEN 5272/zabbix_agentd