There are a lot of Linux users because of the selinux is not familiar with, so it will be closed, to avoid affecting the use of other services, the following small series to share with you how to close selinux, I hope to help you.
-
First we can use the command to view the status of SELinux
Getenforce This command can see the status of SELinux, which can now be seen in the off state.
-
There is also a command to see the status of SELinux.
sestatus-v
-
There is also a setenforce command to set the status of SELinux,
To view man 8 setenforce
-
Assuming that SELinux is running, we can use the setenforce command to set the temporary shutdown without the restart effect.
setenforce 0
-
We can also edit the file and then restart it to take effect.
Vi/etc/sysconfig/selinux
Change the line to
selinux=disabled
and save it, then restart it.
-
Changed, the contents of the file, such as
Setenforce 0 can be temporarily closed, But it will still be the same after a reboot.
Modify the /etc/sysconfig/selinux file to permanently disable it.
How to turn off SELinux (go) inside Linux