FreeBSD上启用SNMP

安装snmp:
cd /usr/ports/net-mgmt/net-snmp
make install clean

修改/etc/rc.conf:
ee /etc/rc.conf
加入:
------------------------------------------------------------------
snmpd_enable="YES"
snmpd_flags="-a -p /var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
------------------------------------------------------------------

运行下:
/etc/netstart

编辑snmpd.conf:
ee /usr/local/share/snmp/snmpd.conf
加入一行:
-------------------------------------------------------------
rocommunity public   #默认让snmp使用public用户
--------------------------------------------------------------

启动snmpd:
/usr/local/etc/rc.d/snmpd.sh start

你可能感兴趣的:(操作系统,职场,FreeBSD,休闲)