分类:
2008-06-20 22:45:56
net-snmp configuration summary SNMP Version Support: 1 2c 3 Net-SNMP Version: 5.4.1 Building for : Linux Network transport support: callback Unix Tcp Udp SNMPv3 security modules: usm Agent MIB code: default_modules=>snmpv3mibs mib2 ucd-snmp notification notificaion-log-mib target agent-mibs agentx disman/event disman/schedule utilities host Embeded perl support: enabled SNMP perl modules: building embedable SNMP python modules: disabled Authentication support: MD5 SHA1 Encryption support: DES AES |
This has been seen in a number of guises over the years - most commonly on Linux systems (although the problem may also occur elsewhere). A typical installation may not always include the full set of library links required for building the Net-SNMP software. This problem can usually be fixed by installing the missing packages (typically the development version of a package that is already there). Examples of this that we have come across include: -lelf elfutils-devel (later renamed to elfutils-libelf-devel) These are the names of the RedHat/Fedora RPMs. Other distributions or O/S's may use different names, but the basic idea should be the same. If the compilation is complaining about a missing .so file, then an alternative quick fix is to add the missing symbolic link, using something like: ln -s libelf.so.1 /usr/lib/libelf.sogiving the appropriate generic library name from the error message, and the correct number for whichever version of this library you have installed. |
9.运行snmptranslate 测试是否可以正确解析OID
可以参考:
几个选项介绍如下:
a.-On 用数字形式输出
b.-Of 输出完整名字
c.-IR
OID的形式一般需要这样提供的
模块名::mib object的最底层名字 例如:SNMPv2-MIB::sysUpTime.0
-IR 选项使得用户可以不用提供前面的模块名
d.-Tp -Td 用户提供OID的时候不需要加后缀.0
-Tp 打印该节点树的详细信息
-Td 输出该节点的详细信息
10.参照教程 简单配置windows下的snmp服务
在linux下用snmpget snmpwalk 等工具访问成功
对snmp有个感性认识
11.开始配置linux下的snmp agent
检测snmpd是否运行
%snmpwalk -v 1 -c public 127.0.0.1 SNMPv2-MIB::sytem
返回 No response from 127.0.0.1
说明SNMPv2-MIB::sytem 已经解析成功,但是snmpd没有反应
%netstat -apn | grep 161
%ps -aux | grep -i snmpd
都没有关于snmpd的信息返回,说明snmpd没有运行
12.后台运行snmpd
%snmpd &
如果失败,就要仔细检查/usr/local/etc/snmp 下的snmpd.conf 文件是否配置正确
不是 /etc/snmp/ 下的snmpd.conf 文件哦,它没有执行权限
13. %snmpwalk -v 1 -c public 127.0.0.1 SNMPv2-MIB::sytem
成功访问!