1. 下载安装
net-snmp安装程序:net-snmp-5.4.2.1-1.win32.exe
Perl安装程序:ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi
安装过程默认就好
2. 配置snmpd.conf文件
在路径(ne-snmp软件安装路径)\etc\snmp\下,新建文件snmpd.conf,注意去掉.txt后缀,另外此路径下已经有了一个snmp.conf文件,不要混乱两者,
然后一下两种方式二选一:
a.简单配置:在snmpd.conf加入:rocommunity public
b.详细配置:在snmpd.conf加入:
####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):
# sec.name source community
com2sec local localhost root
com2sec local 192.168.1.110 root
com2sec mynetwork 192.168.1.0/24 public
####
# Second, map the security names into group names:
# sec.model sec.name
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
####
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
####