1、cd /usr/ports/net-mgmt/net-snmp/
2、make clean
3、make deinstall
4、make install
Tk-804.028_502.tar.gz doesn't seem to exist in /usr/ports/distfiles/.报错的处理:
通过ftp显示的链接地址下载Tk-804.028_502.tar.gz安装包,拷贝到指定的目录/usr/ports/distfiles/下,再次进行make insall安装
5、make clean
6、进入系统启动的目录:/etc/rc.conf添加如下信息:
snmpd_enable="YES"
snmpd_flags="-a"
snmpd_pidfile="/var/run/snmpd.pid"
snmptrapd_enable="YES"
snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
7、新建立一文件,命名为:snmpd.conf,添加如下信息:
com2sec notConfigUser default quanshi
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact all none none
view all included .1 80
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
8、进行文件的拷贝:cp -r /root/snmpd.conf /usr/local/share/snmp/
9、/usr/local/etc/rc.d/snmpd start
10、检查进行和端口:
ps aux|grep snmp
socket |grep snmp
阅读(751) | 评论(0) | 转发(0) |