# How do I add MIBS to net-snmp? [Solved]

## rsborn

I have read the tutorial but I really am having a hard time understanding how to add a bunch of specific MIB files to net-snmp. Maybe the gentoo way of installing changes the config a bit or maybe I just can't understand what I am doing. What I really need to use is the snmpset and snmpget commands using names instead of OID's.

So I found the mib files that got installed in /usr/share/snmp/mibs and I installed my mibs in a directory below this one. As I understand the way this is supposed to work is that an environment variable is created called MIBDIRS that contains a delimited list of directories that mib files are located in but I don't have this environment variable.

Do you recommend that I use environment variables or should I build a snmp.conf file (I really wish there was an example), also do I just need to dump the mib files in the directory and everything will magically work or do I need to recompile?

Thanks for any help you can provide, I'm a bit lost here

RickLast edited by rsborn on Sat Jan 20, 2007 5:01 pm; edited 1 time in total

----------

## rsborn

So the quick version is this:

1. Created a directory for my MIBS, I chose /usr/share/snmp/printermibs

2. Created locl environment variable file in /etc/env.d called 99local

3. Put the following in this file:

MIBDIRS="/usr/share/snmp/mibs:/usr/share/snmp/printermibs

MIBS="ALL"

run env-update and you are all set, you should be able to use net-snmp to access the mibs in both the default location as well as the ones located in the printermibs directory

I thought I had done all of this before (just using export commands) but I must have not defined both at the same time

----------

