首页 > 技术文章 > CentOS 7 关闭Selinux

Rozdy 2019-09-10 15:04 原文

临时关闭:

[root@localhost ~]# getenforce
Enforcing

[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive

 

永久关闭:

[root@localhost ~]# vim /etc/sysconfig/selinux

SELINUX=enforcing 改为 SELINUX=disabled

修改配置需要重启

[root@localhost ~]# reboot

推荐阅读