#!/bin/bashyum -y install gccyum -y install make*#Install and configwget http://prdownloads.sourceforge.net/zabbix/zabbix-1.8.16.tar.gz?download#wget http://10.10.99.106:/software/zabbix-1.8.16.tar.gztar zxvf zabbix-1.8.16.tar.gzuseradd zabbixcd zabbix-1.8.16./configure --prefix=/usr/local/zabbix --enable-agent && \make && \make installcat >> /etc/services << "EOF"zabbix-agent 10050/tcp Zabbix Agentzabbix-agent 10050/udp Zabbix AgentEOFmkdir /etc/zabbixcp misc/conf/zabbix_agent.conf /etc/zabbix/cp misc/conf/zabbix_agentd.conf /etc/zabbix/sed -i '13s#Server=127.0.0.1#Server=192.168.0.55#' /etc/zabbix/zabbix_agent.confsed -i '82s#Server=127.0.0.1#Server=192.168.0.55#' /etc/zabbix/zabbix_agentd.confsed -i '105s/^/#/' /etc/zabbix/zabbix_agentd.confecho "Hostname=$HOSTNAME" >> /etc/zabbix/zabbix_agentd.confcp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/chmod a+x /etc/init.d/zabbix_agentdsed -i '19s#BASEDIR=/opt/zabbix#BASEDIR=/usr/local/zabbix#' /etc/init.d/zabbix_agentdsed -i '25s#FULLPATH=$BASEDIR/bin/$BINARY_NAME#FULLPATH=$BASEDIR/sbin/$BINARY_NAME#' /etc/init.d/zabbix_agentdchkconfig --add zabbix_agentd && chkconfig zabbix_agentd on && /etc/init.d/zabbix_agentd start

此脚本只作方便以后使用,我的agent端就是使用的它,如朋友们使用有问题,则为环境问题,可能是某个软件包没装导致!