Instructions for SNMP-enabling your FreeBSD box

 

Net-SNMP 5 lives at http://net-snmp.sourceforge.net.

Download Net-SNMP from http://net-snmp.sourceforge.net

This used to be called ucd-snmp.

Install Net-SNMP to include Perl module that comes inside the distribution.

When you run ./configure, make sure you add the switch --with-perl-modules

./configure --with-perl-modules --enable-shared

make

make install

If you already have net-snmp installed, then go to the source directory and in the perl subdirectory and run perl Makefile.PL

cd /path/to/net-snmp-5.1.x/perl

perl Makefile.PL

make

make install

 

Installing from Ports


cd /usr/ports/net-mgmnt/net-snmp
make
make install
make clean

edit /etc/rc.conf
add snmpd_enable="YES"

cd /usr/local/share/snmp
edit snmpd.conf (you may have to create it)
add the following
syslocation home (replace home with whatever you'd like)
syscontact
me@here.com (put in your e-mail or whatever)
rocommunity private (replace with whatever read only name you'd like)
rwcommunity public (again, change this to whatever you'd like)
master yes
now save and exit

cd /usr/local/etc/rc.d
./snmpd.sh start

This will get you up and running with a very basic snmp configuration. There's a handy utility called 'snmpconf' that can be run to help you generate the snmp.conf (optional) and snmpd.conf files. This will give you more options and help tighten up security.

at this point you should be able to snmpwalk your host
snmpwalk -v1 -c public 127.0.0.1

See
http://www.net-snmp.org/tutorial/tutorial-5/commands/index.html for more info on how to use snmp do nifty things...like adding MIBS!