snmp开启 centos,centos如何进入图形界面
大家好,关于snmp开启 centos很多朋友都还不太明白,不过没关系,因为今天小编就来为大家分享关于centos如何进入图形界面的知识点,相信应该可以解决大家的一些困惑和问题,如果碰巧可以解决您的问题,还望关注下本站哦,希望对各位有所帮助!
如何在CentOS系统中安装配置SNMP服务
1、使用SNMP服务前需要在服务器上安装SNMP:使用ROOT用户登陆在服务器,输入:yuminstall net-snmp net-snmp-devel net-snmp-libs net-snmp-utils php-snmp进行下载。
2、上面的程序首先会校验需要升级的文件和需要下载安装的文件,然后列来,告诉你有多大,会提示您是不是这些,需要继续不,输入Y,就开始下载了。
3、下载完成后,会自动解包安装,整个过程是自动的,无需要人工操作。安装完成没有错误会提示:Complete!
4、安装完SNMP服务后,就需要进行相关配置了,SNMP的配置文件在:yum安装snmpd的配置文件为/etc/snmp/snmpd.conf
5、如果不会在命令模式下使用vi编辑器的话,建议把snmpd.conf配置文件下载到本地,然后用UE等文本编辑软件打开编辑更改。
如何在CentOS系统中安装配置SNMP服务
配置snmpd.conf文件需要更改五个地方(默认配置基础上):
1、配置snmp团体名(默认是public): com2secnotConfigUser default public建议更改public为您使用的团体名称
2、将accessnotConfigGroup"" any noauth exact systemview none none更改为accessnotConfigGroup"" any noauth exact all none none
3、将如下两行前面的注释去掉
## incl/excl subtree maskview all included.1 80##-or just the mib2 tree-view mib2 included.iso.org.dod.internet.mgmt.mib-2fc
4、将下面一行前面的注释去掉
#access notConfigGroup"" anynoauth exact roview rwview noneaccess notConfigGroup"" any noauthexact mib2 none none
注意以前您在复制搜索时请使用中间的关键搜索,因为配置文件中字符间隔长,
6、配置文件修改完后,保存,上传到服务器中。
然后输入:service snmpd restart重新启动snmp服务
最后还需要执行如下命令:chkconfig snmpd on意思是把服务加到开机启动中,开机自动运行。
可以使用一个简单命令判断snmp服务是否已经成功启动:
netstat-ln| grep 161
如何解决centos7安装snmp开启的199端口换成161端口
1、使用SNMP服务前需要在服务器上安装SNMP: 2、使用ROOT用户登陆在服务器,输入: yum install net-snmp net-snmp-devel net-snmp-libs net-snmp-utils php-snmp进行下载。 3、上面的程序首先会校验需要升级的文件和需要下载安装的文件,然后列来,告诉你有多大,会提示您是不是这些,需要继续不,输入Y,就开始下载了。 4、下载完成后,会自动解包安装,整个过程是自动的,无需要人工操作。安装完成没有错误会提示:Complete!安装完SNMP服务后,就需要进行相关配置了,SNMP的配置文件在: yum安装snmpd的配置文件为/etc/snmp/snmpd.conf 5、如果您不会在命令模式下使用vi编辑器的话,建议把snmpd.conf配置文件下载到本地,然后用UE等文本编辑软件打开编辑更改。 6、配置snmpd.conf文件需要更改五个地方(默认配置基础上): 1、配置snmp团体名(默认是public): com2sec notConfigUser default public建议更改public为您使用的团体名称 2、将access notConfigGroup"" any noauth exact systemview none none更改为access notConfigGroup"" any noauth exact all none none 3、将如下两行前面的注释去掉## incl/excl subt
如何为CentOS配置snmp代理
切换到系统管理员帐户
安装snmp
确认snmp代理已安装
rpm-q net-snmp
如果未安装,安装snmp
yum install net-snmp
设置开机自动运行snmp
/sbin/chkconfig snmpd on
配置snmp
编辑/etc/snmp/snmpd.conf
更改团体名
查找如下行
# sec.name source community
com2sec notConfigUser default public
将团体名public改为其它任意字段,例:
com2sec notConfigUser default monit
给予可读权限
查找如下行
# group context sec.model sec.level prefix read write notif
access notConfigGroup“” any noauth exact systemview none none
将read权限systemview改为all,例:
access notConfigGroup“” any noauth exact all none none
查找如下行
## incl/excl subtree mask
#view all included.1 80
去掉#view all前面的#,例:
view all included.1 80
启动snmp
/etc/init.d/snmpd start
如果已启动则重启snmp服务
/etc/init.d/snmpd restart
测试snmp
查看端口是否打开
netstat-ln| grep 161
安装snmp测试工具
yum install net-snmp-utils
本机测试snmp数据(修改monit为配置的团体名)
snmpwalk-v 2c-c monit localhost system
远程测试snmp数据(修改ip为服务器ip,snmpwalk命令需要安装net-snmp)
snmpwalk-v 2c-c monit ip system
错误排除
防火墙禁止访问
如果本地测试snmp有数据,远程测试snmp无数据则由于服务器防火墙禁止了外部访问服务器udp 161端口,则:
修改/etc/sysconfig/iptables(或者:/etc/sysconfig/iptables-config),增加如下规则:
-A RH-Firewall-1-INPUT-p udp-m state–state NEW-m udp–dport 161-j ACCEPT
重启iptables
/etc/init.d/iptables restart