首页 > 代码库 > zabbix客户在linux 上安装
zabbix客户在linux 上安装
#!/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-2.4.3 rm zabbix-2.4.3.tar.gz wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.3/zabbix-2.4.3.tar.gz RETVAL=$? tar xzf zabbix-2.4.3.tar.gz cd zabbix-2.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
zabbix客户在linux 上安装
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。