debian6.0 安装配置snmp

来源:互联网 发布:淘宝返现 编辑:程序博客网 时间:2024/05/21 10:07

转自这里:http://www.xtgly.com/2011/11/01/debian-6-snmp%E9%85%8D%E7%BD%AE.htm/comment-page-1

debian 6版本在snmp配置上和5的版本有点区别,以下是配置全程:

1. 安装snmp

# apt-get install snmp snmpd

2. 配置snmp

# vi /etc/snmp/snmpd.conf

注释15行

#agentAddress  udp:127.0.0.1:161

取消注释17行

agentAddress udp:161,udp6:[::1]:161

表示监听所有地址

在44行(system + hrSystem groups only)下添加一行

view   AllView  included .1

修改51行为

  rocommunity xtgly  default    -V  AllView

xtgly是团体名

最后重启一下snmp服务就完成了


注:

重启服务:

service snmpd restart

在本机测试的话:

snmpwalk -v 2c -c xtgly 127.0.0.1

在远程机器上访问的话,需要在远程机上安装snmp,不需要安装snmpd。

snmpwalk -v 2c -c xtgly hostip


在使用cacti,监控宝等工具进行监控的时候,对被监控机的监控,主要就是配置snmpd.conf这个文件了。改好了,就可以用了。


原创粉丝点击