freebsd安装snmp

pkg_add http://ip地址/pub/FreeBSD/ports/packages/Latest/net-snmp.tbz
Fetching http://ip地址/pub/FreeBSD/ports/packages/Latest/net-snmp.tbz... Done.
pkg_add: warning: package 'net-snmp-5.7.2_3' requires 'png-1.5.17', but 'png-1.5.16' is installed
pkg_add: warning: package 'net-snmp-5.7.2_3' requires 'libiconv-1.14_1', but 'libiconv-1.13.1_1' is installed

**** This port installs snmp daemon, header files and libraries but don't
invokes snmpd by default.
If you want to invoke snmpd and/or snmptrapd at startup, put these
lines into /etc/rc.conf.

snmpd_enable="YES"
snmpd_flags="-a"
snmpd_conffile="/usr/local/share/snmp/snmpd.conf /etc/snmpd.conf"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"

**** You may specify the following make variables:

NET_SNMP_SYS_CONTACT="zi@FreeBSD.org"
NET_SNMP_SYS_LOCATION="USA"
DEFAULT_SNMP_VERSION=3
NET_SNMP_MIB_MODULES="host smux mibII/mta_sendmail ucd-snmp/diskio"
NET_SNMP_LOGFILE=/var/log/snmpd.log
NET_SNMP_PERSISTENTDIR=/var/net-snmp

to define default values (or overwriting defaults). At least
setting first two variables, you will not be prompted during
configuration process. You may also set

原文地址:https://www.cnblogs.com/seasonsstory/p/3238661.html