Chinaunix首页 | 论坛 | 博客
  • 博客访问: 329697
  • 博文数量: 62
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 710
  • 用 户 组: 普通用户
  • 注册时间: 2013-05-14 14:12
个人简介

太懒

文章分类

全部博文(62)

文章存档

2015年(8)

2014年(20)

2013年(34)

我的朋友

分类: Oracle

2014-10-31 15:33:56

脚本安装 zabbix-agent
#!/bin/bash # install zabbix-agent # a.fanliao@gmail.com # Jun 20 10:37:40 CST 2013 . /etc/profile a=0 while [ $a -lt 1 ]; do      rpm -Uhv && (( a++ ))      sleep 2      #if [ $? != 0 ];then      #     echo "install zabbix repo failed!"     #else      #   echo "install zabbix repo ok"      #     a=a+1      #fi done b=0 while [ $b -lt 1 ]; do     yum --enablerepo=zabbix install zabbix-agent -y && (( b++ ))      sleep 2 done #ok chkconfig zabbix-agent on  || ( echo "chkconfig failed" ) #wget ftp://my2950.momo.org/pub/kik/zabbix/zabbix_agentd.conf.linux if [ -f /etc/zabbix/zabbix_agentd.conf ];then     mv /etc/zabbix/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf.orig && ( echo "mv orig conf file" )      wget ftp://my2950.momo.org/pub/kik/zabbix/zabbix_agentd.conf.linux -O /etc/zabbix/zabbix_agentd.conf.linux || ( echo "wget failed" )      ln -s /etc/zabbix/zabbix_agentd.conf.linux /etc/zabbix/zabbix_agentd.conf || ( echo "ln failed" ) else        wget ftp://my2950.momo.org/pub/kik/zabbix/zabbix_agentd.conf.linux -O /etc/zabbix/zabbix_agentd.conf.linux || ( echo "wget failed" )      ln -s /etc/zabbix/zabbix_agentd.conf.linux /etc/zabbix/zabbix_agentd.conf || ( echo "ln failed" ) fi service zabbix-agent start || ( echo "services failed" ) echo "more /etc/zabbix/zabbix_agentd.conf" more /etc/zabbix/zabbix_agentd.conf | grep ^[^#$]
[root@node3 ~]# more /etc/zabbix/zabbix_agentd.conf | grep ^[^#$] PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=0 Server=my2950.momo.org ServerActive=my2950.momo.org Include=/etc/zabbix/zabbix_agentd.d/ UnsafeUserParameters=1 [root@node3 ~]#




附件列表

     

    阅读(1533) | 评论(0) | 转发(0) |
    给主人留下些什么吧!~~