• 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
  • 相关阅读:
    java栈的实现复习
    条件判断语句--linux
    转义符&脚本参数--linux
    linux备份脚本-模板
    github的搜索使用技巧
    sonarqube7.9安装部署(linux)
    openjdk与oraclejdk下载
    gitlab重写历史,清理历史大文件
    nexus私服搭建过程
    nexus私服关联本地maven配置
  • 原文地址:https://www.cnblogs.com/crafter/p/2288660.html
Copyright © 2020-2023  润新知