1.版本
Ubuntu 14.04.1 LTS
2.安装
root@ubuntu:/etc/apt# apt-get install snmpd
3.配置
root@ubuntu:/etc/apt# vim /etc/snmp/snmpd.conf
# Listen for connections from the local system only
#agentAddress udp:127.0.0.1:161
# Listen for connections on all interfaces (both IPv4 *and* IPv6)
#agentAddress udp:161,udp6:[::1]:161
agentAddress udp:161
# ACCESS CONTROL
#
# system + hrSystem groups only
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
view systemonly included .1.3.6.1.2.1.25
view systemonly included .1.3.6.1.2.1.2
# Full access from the local host
#rocommunity public localhost
# Default access to basic system info
# rocommunity public default -V systemonly
rocommunity mypublic default -V systemonly
root@ubuntu:/etc/apt#vim /etc/default/snmpd
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /var/run/snmpd.pid'
4.测试
root@ubuntu:/etc/apt# apt-get install snmp
root@ubuntu:/etc/apt# snmpwalk -v 2c -c mypublic localhost
......
......
...... = No more variables left in this MIB View (It is past the end of the MIB tree)
#测试成功