网站首页 健康小知识 母婴教育 起名 运动知识 职场理财 情感生活 绿色生活 游戏数码 美容 特色美食 爱好

CentOS7关闭防火墙和SELinux

栏目: 互联网 / 发布于: / 人气:3.14W

本文主要讲述了如何在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命令