sudo apt-get install snmpd
sudo vim /etc/snmp/snmpd.conf
修改配置文件,红色部分为新增
# sec.name source community
com2sec paranoid default public
com2sec network 192.168.1.1 ingpingboy #允许192.168.1.1访问
# Second, map the security names into group names:
# sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 network
group MyROGroup v2c network
group MyROGroup usm network
设置允许远程访问
sudo vim /etc/default/snmpd
注释掉 #SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'
ok