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




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章