Centos7配置 SNMP服务
一、安装yum源安装SNMP软件包
1、更新yum源:
yum clean all

yum makecache

yum repolist

2、yum源安装SNMP服务:
yum -y install net-snmp net-snmp-utils

3、查看SNMP版本号:
snmpd -v
二、更改团体名:
vi /etc/snmp/snmpd.conf
com2sec notConfigUser default public
改为;
com2sec nontConfigUser defautl passw0rd (此为需要验证的团体名)

三、重启服务:
systemctl start snmpd.service #启动SNMP服务
systemctl enable snmpd.service #开机启动SNMP服务

四、添加防火墙端口
firewall-cmd --state #查看防火墙状态


firewall-cmd --list-all

vi /etc/firewalld/zones/public.xml
<port protocol="udp" port="161"/>

systemctl restart firewalld.service #重启防火墙服务
firewall-cmd --list-all

systemctl restart snmpd.service #重启SNMP服务


浙公网安备 33010602011771号