安装配置zabbix-agent
[root@51ou.com zabbix_agent_deploy]# zabbix_agentd -V
[root@51ou.com zabbix_agent_deploy]# zabbix_agentd -V
Zabbix Agent (daemon) v2.4.1 (revision 49643) (8 October 2014)
Compilation time: Oct 10 2014 21:34:08
[root@51ou.com zabbix_agent_deploy]# ls
install_agent.sh sbin zabbix-agent
[root@51ou.com zabbix_agent_deploy]# ls sbin/
zabbix_agent zabbix_agentd
[root@51ou.com zabbix_agent_deploy]# cat install_agent.sh
#!/bin/bash
#
cip='192.168.1.12'
sip='192.168.5.254'
cp sbin/zabbix_* /usr/sbin/
mkdir -p /etc/zabbix/zabbix_agentd.conf.d
cat <<_CFG >>/etc/zabbix/zabbix_agentd.conf
PidFile=/tmp/zabbix_agentd.pid
LogFile=/tmp/zabbix_agentd.log
SourceIP=$cip
Server=$sip
ListenIP=$cip
ServerActive=$sip
Hostname=$cip
Timeout=30
Include=/etc/zabbix/zabbix_agentd.conf.d/
_CFG
useradd -s /sbin/nologin -d /var/lib/zabbix -c "Zabbix Monitoring System" zabbix
cp ./zabbix-agent /etc/init.d/
chmod +x /etc/init.d/zabbix-agent
service zabbix-agent start
chkconfig zabbix-agent on
chkconfig --list |grep zabbix