zoukankan      html  css  js  c++  java
  • 基于LNMP的Zabbbix之Zabbix Agent源码详细安装,但不给图

    基于LNMP的Zabbbix之Zabbix Server源码详细安装:http://www.cnblogs.com/losbyday/p/5828547.html
     wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.3/zabbix-3.0.3.tar.gz
     tar zxf zabbix-3.0.3.tar.gz
     cd zabbix-3.0.3
     ./configure --prefix=/usr/local/zabbix_agent --enable-agent ; make install
    cp /usr/local/src/zabbix-3.0.3/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/      
    sed -i 's#BASEDIR=/usr/local#BASEDIR=/usr/local/zabbix_agent#' /etc/init.d/zabbix_agentd # 修改 Agent 安装路径
    grep -vP '^#|^$' /usr/local/zabbix_agent/etc/zabbix_agentd.conf  # 调整配置文件
    LogFile=/tmp/zabbix_agentd.log
    Server=xx.xx.xx.xx      # Zabbix Server IP ( 被动模式,客户端被动 )
    ServerActive=127.0.0.1       # 主动模式,如果使用也填 Zabbix Server IP ,不使用可以注释掉
    Hostname=xx.xx.xx.xx    # 本身 IP ,Zabbix Server 添加主机时需要使用,不一定是 IP 
    Include=/usr/local/zabbix_agent/etc/zabbix_agentd.conf.d/*.conf   # 加载自定义的监控配置文件
    UnsafeUserParameters=1 # 允许自定义 Key
    service zabbix_agentd start
    chkconfig --add zabbix_agentd
    chkconfig --level 35 zabbix_agentd on
    iptables -A INPUT -s 'Zabbix Server IP' -p tcp --dport 10050 -j ACCEPT # 由于是客户端被动模式,所以要开放端口供 Zabbix Server 连接

    ---------------------------------------------service zabbix_agentd start error--------------------------------------

    [root@mini10 zabbix-3.0.3]# service zabbix_agentd start
    Starting zabbix_agentd:  zabbix_agentd [90341]: user zabbix does not exist
    zabbix_agentd [90341]: cannot run as root!
                                                               [FAILED]
    [root@mini10 zabbix-3.0.3]# useradd zabbix      #搬运工,用户都忘记创建了
    [root@mini10 zabbix-3.0.3]# service zabbix_agentd start
    Starting zabbix_agentd:                                    [  OK  ]

    来源;http://www.tuicool.com/articles/ZJfYzyF

  • 相关阅读:
    python
    VSCompile
    Oracle学习
    CMD
    JQuery 学习
    单词
    解决Manjaro+win双系统相差8小时
    编辑器使用
    软件安装
    磁盘分区与逻辑卷管理
  • 原文地址:https://www.cnblogs.com/losbyday/p/5830676.html
Copyright © 2011-2022 走看看