国内最全IT社区平台 联系我们 | 收藏本站
华晨云阿里云优惠2
您当前位置:首页 > php框架 > 框架设计 > zabbix客户在linux 上安装

zabbix客户在linux 上安装

来源:程序员人生   发布时间:2015-01-07 08:06:25 阅读次数:3867次
#!/bin/bash ip=59.201.201.152 groupadd zabbix useradd -g zabbix zabbix yum -y install gcc curl-devel net-snmp-devel fping e2fsprogs-devel zlib-devel libgssapi-devel krb5-devel openssl-devel wget libssh2-devel openldap-devel libxml2-devel make patch rm -rf /etc/zabbix rm -rf zabbix⑵.4.3 rm zabbix⑵.4.3.tar.gz wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.3/zabbix⑵.4.3.tar.gz RETVAL=$? tar xzf zabbix⑵.4.3.tar.gz cd zabbix⑵.4.3 ./configure --prefix=/opt/zabbix_agent --enable-agent make install cat >>/etc/services<<EOF zabbix-agent 10050/tcp Zabbix Agent zabbix-agent 10050/udp Zabbix Agent zabbix-trapper 10051/tcp Zabbix Trapper zabbix-trapper 10051/udp Zabbix Trapper EOF sed -i "s/^[ ]*Server=.*/Server=$ip/g" /opt/zabbix_agent/etc/zabbix_agent.conf sed -i "s/^[ ]*Server=.*/Server=$ip/g" /opt/zabbix_agent/etc/zabbix_agentd.conf cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/ sed -i "s#^[ ]*BASEDIR.*# BASEDIR=/opt/zabbix_agent#g" /etc/init.d/zabbix_agentd chmod a+x /etc/init.d/zabbix_* cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/ chmod a+x /etc/init.d/zabbix_* BASEDIR=/ect/zabbix_agent FULLPATH=$BASEDIR/sbin/$BINARY_NAME #configuration file CONF_FILE=$BASEDIR/etc/zabbix_agentd.conf action $"Starting $BINARY_NAME: " $FULLPATH -c $CONF_FILE service zabbix_agentd start ps ax|grep zabbix_agentd

生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠
程序员人生
------分隔线----------------------------
分享到:
------分隔线----------------------------
关闭
程序员人生