Build a mib2c environment in ubuntu and a mib2c environment in ubuntu
1. Download net-snmp
Http://net-snmp.sourceforge.net/download.html
For example, download version 5.5
2. Go to the download directory and decompress the. net-snmp package.
# Tar zxf net-snmp-5.5.tar.gz
3. configure
# Cd net-snmp-5.5
#. /Configure -- with-default-snmp-version = "2" -- with-sys-contact = "contact @ contact" -- with-sys-location = "location" -- with-logfile = "/var/log/snmpd. log "-- with-persistent-directory ="/var/net-snmp"
4. make
# Make
# Make install
5. Configure the conf file
# Vi/etc/snmpd. conf
In snmpd. conf, merge the following line:
Rocommunity public
: Wq save and exit
6. Start
# Snmpd-C-c/etc/snmpd. conf
7. Check 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 in 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 cocould not find
Any information about the mib node "". This cocould be caused
Because you supplied an incorrectly node, or by the MIB that 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:
Http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to display information about
Your MIB node. Once snmptranslate works, then come back and try mib2c
Again.
Proof available, build complete.