My preference is using Net-SNMP which is included in ports, start by fetching the latest ports tree;
# portsnap fetch
# portsnap extract
Then head over to the port location and install
# cd /usr/ports/net-mgmt/net-snmp
# make install clean
Copy the sample configuration over to a working configuration if you need some examples
cp /usr/local/share/snmp/snmpd.conf.example /etc/snmpd.conf
Or to work straight out of the box, you can have a quick and dirty configuration containing; ( obviously changing community and bits ) **default is 32**
e.g. rocommunity testcomm:32
Syntax;
rocommunity community:bits
Now to make the snmp server start at boot time;
snmpd_enable=”YES”
snmpd_conffile=”/etc/snmpd.conf”
Without rebooting start the SNMP server;
/usr/local/etc/rc.d/snmpd start
you can test by using;
snmpwalk -v1 -c public 127.0.0.1