首页 > 游戏数码 > 互联网 > CentOS7关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux

   来源:秒知站    阅读: 3.3W 次
字号:

用手机扫描二维码 在手机上继续观看

手机查看

本文主要讲述了如何在CentOS7上临时关闭防火墙、永久关闭防火墙、临时关闭SELinux和永久关闭SELinux的方法。
出自openstackblog。

防火墙(firewalld)

(01)临时关闭防火墙systemctl stop firewalld

(02)永久防火墙开机自启动systemctl disable firewalld

(03)临时打开防火墙systemctl start firewalld

(04)防火墙开机启动systemctl enable firewalld

(05)查看防火墙状态systemctl status firewalld

SELinux

(01)临时关闭SELinuxsetenforce 0

(02)临时打开SELinuxsetenforce 1

(03)开机关闭SELinux编辑/etc/selinux/config文件,将SELINUX的值设置为disabled,如下图。下次开机SELinux就不会启动了。

CentOS7关闭防火墙和SELinux

(04)查看SELinux状态执行getenforce命令

电脑网络
IT技术
互联网
电脑
摄影
手机
游戏