1. Download Net-snmp
Http://net-snmp.sourceforge.net/download.html
For example, download version 5.5
2. Go to the download directory, unzip the NET-SNMP compression pack
#tar ZXF net-snmp-5.5.tar.gz
3.configure
#cd net-snmp-5.5
#./configure--with-default-snmp-version= "2"--with-sys-contact= "[email protected]"--with-sys-location= "Location" --with-logfile= "/var/log/snmpd.log"--with-persistent-directory= "/var/net-snmp"
4.make
# make
# make Install
5. Configuring the Conf file
# vi/etc/snmpd.conf
Enter a line in the snmpd.conf:
Rocommunity Public
: Wq Save and exit
6. Start
# snmpd-c-c/etc/snmpd.conf
7. Inspection MIB2C
# MIB2C
If the following occurs:
Use of uninitialized value $key in hash element at/usr/local/lib/perl/5.10.1/snmp.pm line 1325.
Use of uninitialized value $key in hash element at/usr/local/lib/perl/5.10.1/snmp.pm line 1326.
Use of uninitialized value is null operation AT/USR/LOCAL/LIB/PERL/5.10.1/SNMP.PM Line 1325.
You didn ' t give MIB2C a valid OID to start with. IE, I could not find
Any information about the MIB node "". This could is caused
Because you supplied a incorrectly node, or by the MIB so you ' re
Trying to generate code from isn ' t loaded. To make sure your MIB is
Loaded, run MIB2C using this as an example:
Env mibs= "+my-personal-mib" mib2c
You might wish-to-start by reading the MIB loading tutorial at:
Http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to the display information about
Your MIB node. Once Snmptranslate works, then come back and try Mib2c
Again.
Proof available, build complete.
Ubuntu Builds MIB2C Environment