Linux中关闭selinux状态
1.查看selinux的状态
[root@localhost ~]# getenforce
Enforcing表示selinux是开启状态
2.临时关闭selinux
[root@localhost ~]# setenforce 0
临时关闭后查看selinux显示Permissive.
3.永久关闭selinux
首先进入到selinux配置文件
[root@localhost ~]# vi /etc/selinux/config
在这里vi进入到配置文件内需要先按键盘上的a或者i进入到编辑模式下进行更改, 然后将SELINUX=enforcing改成SELINUX=disabled
4.最后重启一下服务器在查看selinux
然后这里显示Disabled表示已经关闭完成了。