首页 > 代码库 > snmp的安装与配置

snmp的安装与配置

  1. 安装snmp

    #yum install -y net-snmp net-snmp-utils net-snmp-devel

    请确保安装如下几个包:

    # rpm -qa |grep snmp
    net-snmp-5.1.2-11.EL4.7
    net-snmp-libs-5.1.2-11.EL4.7
    net-snmp-devel-5.1.2-11.EL4.7
    net-snmp-utils-5.1.2-11.EL4.7
    net-snmp-perl-5.1.2-11.EL4.7


  2. 修改配置文件snmpd.conf

    #vim /etc/snmp/snmpd.conf

     1、 com2sec notConfigUser default public
     改为: com2sec notConfigUser 127.0.0.1 public
     如果要在别的机器(192.168.3.192)上运行观测软件监测(本机ip是192.168.3.190),也应该再加上:
     com2sec notConfigUser 192.168.3.192 public
     2、 access notConfigGroup "" any noauth exact systemview none none
     改为: access notConfigGroup "" any noauth exact all none none
     3、开启该行view all included .1 80

   

3.重启snmpd服务

  #service snmpd restart


4.使用snmp进行监控

  #snmpwalk -v 2c -c public localhost




本文出自 “运维工作笔记” 博客,请务必保留此出处http://yyyummy.blog.51cto.com/8842100/1554628

snmp的安装与配置