Centos7配置 SNMP服务
一、安装yum源安装SNMP软件包1、更新yum源:
yum clean all
http://s1.运维网.com/images/20180412/1523492545796972.png
yum makecache
http://s1.运维网.com/images/20180412/1523492786448625.png
yum repolist
http://s1.运维网.com/images/20180412/1523492840131287.png
2、yum源安装SNMP服务:
yum -y install net-snmp net-snmp-utils
http://s1.运维网.com/images/20180412/1523492965358376.png
3、查看SNMP版本号:
snmpd -v
http://s1.运维网.com/images/20180412/1523493017688998.png
二、更改团体名:
vi /etc/snmp/snmpd.conf
com2sec notConfigUserdefaultpublic
改为;
com2sec nontConfigUserdefautlpassw0rd (此为需要验证的团体名)
http://s1.运维网.com/images/20180412/1523493224237701.png
三、重启服务:
systemctl start snmpd.service #启动SNMP服务
systemctl enable snmpd.service#开机启动SNMP服务
http://s1.运维网.com/images/20180412/1523493546922236.png
四、添加防火墙端口
firewall-cmd --state #查看防火墙状态
http://s1.运维网.com/images/20180412/1523493960842249.png
http://s1.运维网.com/images/20180412/1523494073939324.png
firewall-cmd --list-all
http://s1.运维网.com/images/20180412/1523494161799343.png
vi /etc/firewalld/zones/public.xml
http://s1.运维网.com/images/20180412/1523494336718102.png
systemctl restart firewalld.service #重启防火墙服务
firewall-cmd --list-all
http://s1.运维网.com/images/20180412/1523494452997199.png
systemctl restart snmpd.service #重启SNMP服务
http://s1.运维网.com/images/20180412/1523494517316696.png
页:
[1]