zoukankan      html  css  js  c++  java
  • linux下netsnmp 已经安装,为什么没有 snmpwalk和snmpget

    [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
  • 相关阅读:
    Jmeter之http性能测试实战 非GUI模式压测 NON-GUI模式 结果解析TPS——干货(十一)
    UI Recorder 自动化测试 回归原理(九)
    UI Recorder 自动化测试 录制原理(八)
    UI Recorder 自动化测试 整体架构(七)
    UI Recorder 自动化测试 配置项(六)
    UI Recorder 自动化测试 工具栏使用(五)
    UI Recorder 自动化测试 回归测试(四)
    UI Recorder 自动化测试 录制(三)
    UI Recorder 自动化测试工具安装问题疑难杂症解决(二)
    UI Recorder 自动化测试安装教程(一)
  • 原文地址:https://www.cnblogs.com/dkblog/p/1980830.html
Copyright © 2011-2022 走看看