安裝snmpd
#cd /usr/ports/net-mgmt/net-snmp
#make install clean

複製設定檔到/usr/local/etc
#cp /usr/local/share/snmp/snmpd.conf.example /usr/local/etc/snmpd.conf

編輯/etc/rc.conf,加入
snmpd_enable="YES"
snmpd_conffile="/usr/local/etc/snmpd.conf"

編輯/usr/local/etc/snmpd.conf
將master agentx 改成 master agentx on

啟動snmpd
#/usr/local/etc/rc.d/snmpd start

測試指令
#snmpwalk -v1 -c public 127.0.0.1

Categories: FreeBSD