net-snmp-5.4.4 编译,安装,运行。

总结


net-snmp编译和安装:(http://www.cnblogs.com/oloroso/p/4595123.html)
net-snmp配置文件含义:(http://blog.csdn.net/shanzhizi/article/details/16985989)
(http://www.linuxde.net/2013/02/12269.html)


下载连接

wget  http://downloads.sourceforge.net/project/net-snmp/net-snmp/5.4.4/net-snmp-5.4.4.tar.gz

编译和安装

./configure --prefix=/usr/local/net-snmp
make 
//注:如果提醒错误详见链接(sudo apt-get install libperl-dev)
make install
//查看版本
/usr/local/net-snmp/sbin/snmpd -v 

snmpd.conf 配置

使用这个配置文件:
net-snmp-5.4.4/python/netsnmp/tests/snmpd.conf

运行

假如snmpd.conf拷贝到这个目录下:
/usr/local/net-snmp/share/snmp/snmpd.conf

/usr/local/net-snmp/sbin/snmpd -f -Le -c /usr/local/net-snmp/share/snmp/snmpd.conf

Linux下测试

[root@devvm bin]# ./snmpwalk -v 2c -c public localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux devvm 3.7.5-1-ARCH #1 SMP PREEMPT Mon Jan 28 10:38:12 CET 2013 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (124074) 0:20:40.74
SNMPv2-MIB::sysContact.0 = STRING: G. S. Marzot 
SNMPv2-MIB::sysName.0 = STRING: devvm
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (11) 0:00:00.11
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.9 = OID: SNMP-NOTIFICATION-MIB::snmpNotifyFullCompliance
SNMPv2-MIB::sysORID.10 = OID: NOTIFICATION-LOG-MIB::notificationLogMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB modules for managing SNMP Notification, plus filtering.
SNMPv2-MIB::sysORDescr.10 = STRING: The MIB module for logging SNMP Notifications.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (9) 0:00:00.09
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (10) 0:00:00.10
SNMPv2-MIB::sysORUpTime.10 = Timeticks: (11) 0:00:00.11
[root@devvm bin]# ./snmpwalk -v 2c -c public localhost sysORID.1
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance

Window下MG-SOFT软件测试

你可能感兴趣的:(SNMP-协议)