Ubuntu-安装SNMPD

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)

#测试成功

转载于:https://my.oschina.net/forlinux/blog/369669

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值