关闭→
当前位置:趣知常识网>游戏数码>互联网>CentOS7关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux

趣知常识网 人气: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命令

TAG标签:#CentOS7 #SELinux #防火墙 #关闭 #