于吉吉的技術博客

          建造高性能門戶網(wǎng)

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            65 隨筆 :: 6 文章 :: 149 評論 :: 0 Trackbacks
          NET-SNMP的官方網(wǎng)站是:http://www.net-snmp.org
          先閱讀一下官網(wǎng)的一點說明(詳細見官網(wǎng))
          Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg.routers), computer equipment and even devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6
          ...

          安裝

          在http://www.net-snmp.org/download.html選擇最新版本進行下載

          wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6/net-snmp-5.6.tar.gz

          tar -xvf net-snmp-5.6.tar.gz

          cd net-snmp-5.6

          ./configure --prefix=/usr/local/net-snmp --with-default-snmp-version="2" --with-logfile=/usr/local/net-snmp/log/snmplog.log --with-persistent-directory=/var/net-snmp


          --prefix 安裝的路徑
          --with-default-snmp-version 默認的版本
          --with-logfile 日志文件的路徑
          --with-persistent-directory 固定數(shù)據(jù)存儲目錄

          make && make install

          cp EXAPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf

          vi snmpd.conf

          60 #       sec.name  source          community
          61 com2sec local     localhost       COMMUNITY
          62 com2sec mynetwork NETWORK/24      COMMUNITY


          修改為   

          60 #       sec.name  source          community
          61 com2sec local     localhost       public
          62 com2sec mynetwork NETWORK/24      public


          在/etc/rc.local追加
          /usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf

          在/etc/profile文件的export命令前追加
          PATH=/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin:$PATH

          檢查

          使用 ps -aux | grep snmpd查看snmpd的進程是否啟動

          使用如下命令從本機檢查snmp是否得到系統(tǒng)數(shù)據(jù)

          snmpwalk -v 2c -c public localhost

          如果返回的不是Time out,而是系統(tǒng)信息就說明net-snmp安裝成功

          posted on 2010-11-29 11:34 陳于喆 閱讀(2451) 評論(0)  編輯  收藏 所屬分類: linux 、安裝配置
          主站蜘蛛池模板: 开远市| 调兵山市| 甘泉县| 合肥市| 乌鲁木齐市| 永修县| 紫阳县| 深泽县| 东乌珠穆沁旗| 漠河县| 河南省| 阜南县| 龙州县| 治县。| 岢岚县| 东城区| 易门县| 佛山市| 二连浩特市| 呼伦贝尔市| 白玉县| 庄河市| 海丰县| 正镶白旗| 麻城市| 镇宁| 奉贤区| 临澧县| 江口县| 油尖旺区| 临安市| 泸西县| 曲松县| 石阡县| 六枝特区| 永胜县| 元阳县| 延津县| 衡南县| 资兴市| 绥化市|