linux下net-snmp 已經安裝,為什麼沒有 snmpwalk和snmpget

來源:互聯網
上載者:User
[root@localhost ~]# snmpwalk
-bash: snmpwalk: command not found

確保安裝這幾個包
# 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

請到安裝盤裡尋找,一般在第4,5張光碟片
net-snmp-utils-5.0.9-2.30E.15.i386.rpm
net-snmp-perl-5.0.9-2.30E.15.i386.rpm
...

--------------------------------------------------------------------
from:http://twpug.net/modules/newbb/viewtopic.php?post_id=9543

Fatal error: Call to undefined function: snmpwalk() in /home/httpd/html/snmp.php on line 3

Linux上使用的是net-snmp,則需要在./configure 時增加 --with-snmp 即可安裝成功。
[root@localhost php-4.3.4]# ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-sockets --with-zlib-dir=/usr/include --with-snmp

如果是ucd-snmp,則嘗試在./configure 時增加 --enable-ucd-snmp-hack

from:http://www.vbulletin.com/forum/archive/index.php/t-114170.html
./configure異常情況解決:
異常一
configure: error: snmp.h not found. Check your SNMP installation.

This one's solved by:
# you must install net-snmp-devel

異常二
checking OpenSSL dir for SNMP... no
checking for net-snmp-config... /usr/bin/net-snmp-config
checking for snmp_parse_oid in -lnetsnmp... no
checking for init_snmp in -lnetsnmp... no
configure: error: SNMP sanity check failed. Please check config.log for more information.

This one's solved by:
# you must install elfutils-devel

--------------------------------------------------------------------
配置snmpd.conf檔案:
# vi /etc/snmp/snmpd.conf
修改snmpd.conf檔案
1、com2sec notConfigUser default public
改為:com2sec notConfigUser 127.0.0.1 public
如果要在別的機器(192.168.11.50)上運行觀測軟體監測(本機ip是192.168.11.134),也應該再加上:
com2sec notConfigUser 192.168.11.50 public
2、access notConfigGroup "" any noauth exact systemview none none
改為:access notConfigGroup "" any noauth exact all none none
3、#view all included .1 80
將前面的 # 注釋 去掉。

#:wq
儲存退出

# service snmpd restart

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.