Rpm system must remember setenforce 0, temporarily close selinux and then test
-
First we can use the command to view the status of selinux
The getenforce command can view the status of selinux, which is currently closed.
-
There is also a command to view the status of selinux.
sestatus -v
-
There is also a setenforce command to set the state of selinux,
For details, see man 8 setenforce
-
Assuming selinux is running, we can use the setenforce command to set a temporary shutdown without rebooting.
setenforce 0
-
We can also make the shutdown take effect by editing the file and then restarting.
vi /etc/sysconfig/selinux
Change the line inside to
SELINUX=disabled
Save the changes and then restart.
-
After the modification, the content of the file is as follows
setenforce 0 can be temporarily closed, but it will still be in the original state after restarting.
It can be permanently disabled by modifying the /etc/sysconfig/selinux file.
-