zoukankan      html  css  js  c++  java
  • Debian中snmp的配置(使用监控宝)

    安装:
    apt-get install snmp snmpd

    配置:
    Debian5
    1、修改/etc/snmp/snmpd.conf

    在【first】节中,将如下行前面的"#"去掉,并在其上一行前加“#”:

    #com2sec readonly default public

    在【third】节中,将“view system”行修改为如下

    view mib included .iso.org.dod.internet.mgmt.mib-2 fc

    将如下行: access MyROSystem "" any noauth exact system none none

    修改为: access MyROSystem "" any noauth exact mib2 none none

     
    2、修改/etc/default/snmpd 将"# snmpd options"的下一行中的“127.0.0.1”去掉 

    3、重启snmp服务:/etc/init.d/snmpd restart
     

    4、测试snmp配置:
     
    #snmpwalk -v2c 192.168.0.63 -c public system

    5. 设置账号并限制访问IP(以监控宝为例)
    注释 com2sec readonly default public

    在配置文件最后加入以下内容:
    rocommunity jiankongbao 60.195.249.83
    rocommunity jiankongbao 60.195.252.107
    rocommunity jiankongbao 60.195.252.110
     
    Debian6
    /etc/snmp/snmpd.conf
    充许所有接口访问:
    #  Listen for connections from the local system only
    # agentAddress  udp:127.0.0.1:161
    #  Listen for connections on all interfaces (both IPv4 *and* IPv6)
    agentAddress udp:161,udp6:[::1]:161
     
    在文件末尾增加:
    rocommunity jiankongbao 60.195.249.83
    rocommunity jiankongbao 60.195.252.107
    rocommunity jiankongbao 60.195.252.110
  • 相关阅读:
    作品第二课----改变DIV任意属性的值
    今天遇到的mouseout和mouseleave之坑
    作品第二课----弹出层
    作品第二课----求数组中所有数字的和
    作品第二课----点击DIV显示其内容
    作品第二课----点击切换显示隐藏
    Linux 静态库与动态库
    Linux学习6-套接字
    Linux学习5-线程
    Linux学习4-信号
  • 原文地址:https://www.cnblogs.com/crafter/p/2288660.html
Copyright © 2011-2022 走看看