1、Linux系统
Debian/Ubuntu上使用apt-get安装
sudo apt-get install snmp snmpd
CentOS/RHEL上使用yum安装
sudo yum install net-snmp net-snmp-utils

2、macbook苹果系统
sudo vi /etc/snmp/snmpd.conf
找到
com2sec local localhost COMMUNITY
com2sec mynetwork NETWORK/24 COMMUNITY
修改为
com2sec local localhost private
com2sec mynetwork NETWORK/24 public

找到
rocommunity public default .1.3.6.1.2.1.1.4
修改为
rocommunity public default .1
找到
#rwcommunity private
去掉注释
rwcommunity private

保存
执行
launchctl load -w /System/Library/LaunchDaemons/snmp.snmpd.plist
如果以后在Mac上更改SNMP设置,则需要运行以下两个命令,而不是上面的launchctl命令
sudo launchctl unload /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
3、windows系统
打开设置-应用-管理可选功能

添加功能

找到snmp安装

安装完成后重启电脑