当前位置:首页 >知识 >转角遇到Zabbix:企业级分布式系统监控部署 正文

转角遇到Zabbix:企业级分布式系统监控部署

来源:益强资讯优选   作者:数据库   时间:2025-11-04 09:34:11
转角遇到Zabbix:企业级分布式系统监控部署
转角复制[root@www20 shell]# cat zabbix_agentd_install.sh  #!/bin/sh  #Create by sfzhang 2014.02.27  yum -y install net-snmp  yum -y install net-snmp-devel  BASE_DIR="/data/software" TAR="zabbix-2.2.1.tar.gz" tar -zxvf $BASE_DIR/$TAR -C$BASE_DIR  cd $BASE_DIR/zabbix-2.2.1  ./configure--prefix=/usr/local/zabbix --sysconfdir=/etc/zabbix --enable-agent  make && make install  groupadd zabbix  useradd zabbix -g zabbix  cpmisc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd  chmod 700/etc/init.d/zabbix_agentd  chown zabbix.zabbix/etc/init.d/zabbix_agentd  sed -i "/BASEDIR=/s#/.*#/usr/local/zabbix#" /etc/init.d/zabbix_agentd  sed -i"s#bin/zabbix_agentd#sbin/zabbix_agentd#" /etc/init.d/zabbix_agentd  sed -i"s#Server=127.0.0.1#Server=192.168.161.129#"/etc/zabbix/zabbix_agentd.conf  sed -i"s#ServerActive=127.0.0.1#\#ServerActive=127.0.0.1#"/etc/zabbix/zabbix_agentd.conf  sed -i "/Hostname=/s#=.*#"=$HOSTNAME#""/etc/zabbix/zabbix_agentd.conf  sed -i"s#\#/tmp/zabbix_agentd.pid#/data/logs/zabbix_agentd.pid#"/etc/zabbix/zabbix_agentd.conf  sed -i"s#/tmp/zabbix_agentd.log#/data/logs/zabbix_agentd.log#"/etc/zabbix/zabbix_agentd.conf  sed -i "s#\#Timeout=3#Timeout=30#" /etc/zabbix/zabbix_agentd.conf  cat>>/etc/services<<EOF #Zabbix services  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  /etc/init.d/zabbix_agentdstart  1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.

标签:

责任编辑:系统运维

国内新闻

图片精选

国际新闻