2018最新linux云计算集群架构师-第一阶段-Linux操作系统入门到精通-第2章-Linux基本操作和自己动手组装服务器-关闭防火墙并设置开机开不启动-临时和永久关闭Selinux

关闭防火墙并设置开机开不启动-临时和永久关闭Selinux

关闭防火墙并设置开机开不启动

#查看当前状态
systemctl status firewalld.service    #查看firewalld状态
systemctl stop firewalld       #关闭
systemctl start firewalld       #开启
systemctl disable firewalld     #开机自动关闭   //RHLE7
chkconfig --list|grep network    #查看开机是否启动   //RHLE6
systemctl enable firewalld     #开机自动启动 

临时和永久关闭Selinux

#临时关闭
getenforce 
setenforce 0

#永久关闭
vim /etc/selinux/config  
#改:7 SELINUX=enforcing     #前面的7,表示文档中第7行。方便你查找
#为:7 SELINUX=disabled
reboot

 

  

 

posted on 2019-11-07 18:27  herisson_pan  阅读(6)  评论(0)    收藏  举报

导航