yum -y groupinstall "Development Tools"
yum -y install ntpdate
###?录?rontab
PROGRAM='ntpdate cn.pool.ntp.org'
CRONTAB_CMD="*/5 * * * * $PROGRAM"
(echo "$CRONTAB_CMD") | crontab -
groupadd -g 201 zabbix
useradd -g zabbix -u 201 -m zabbix
cd /usr/src
ftp -n<<!
open 1.1.1.1
user install xx
pass
bin
get zabbix-2.2.2.tar.gz
get zabbix.conf
exit
!
tar zxvf zabbix-2.2.2.tar.gz
cd zabbix-2.2.2
./configure -sysconfdir=/etc/zabbix -enable-agent
make && make install
cp misc/init.d/tru64/zabbix_agentd /etc/init.d/
chmod +x /etc/init.d/zabbix_agentd
hostname=`hostname`
cd /usr/src
sed -i "s/XX/$hostname/" zabbix.conf
cat zabbix.conf>>/etc/zabbix/zabbix_agentd.conf
/etc/init.d/zabbix_agentd start