标签:start agent efault gen star lang tar 完成 com
1. 安装snmp服务端:snmpd
客户端:snmp
apt-get install -y snmpd snmp
找到并打开snmpd的配置文件
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
vim /etc/snmp/snmpd.conf
将下面两行注释掉
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
重启snmp
/etc/init.d/snmp restart
上面的修改完成之后可以使snmp获取到更多的信息
snmpwalk -c public -v 2c localhost .1.3.6.1.2.1.1
vim /etc/snmp/snmpd.conf
将下面的行注释掉
agentAddress udp:127.0.0.1:161
并取消下面行的注释
#agentAddress udp:161,udp6:[::1]:161
snmpwalk -c publlic -v 2c snmp服务器ip .1.3.6.1.2.1.1
vim /etc/snmp/snmpd.conf
找到并修改下面两行,将public修改为需要的团体字即可
rocommunity public default -V systemonly
rocommunity6 public default -V systemonly
标签:start agent efault gen star lang tar 完成 com
原文地址:https://blog.51cto.com/14284354/2416016