Disabling SELinux
The Kunpeng DevKit checks whether the SELinux enforcing mode is disabled in the OS. To disable the SELinux enforcing mode, perform the following operations:
- Disabling SELinux temporarily
- Query the SELinux status:
1sestatus
If the value of Current mode is enforcing, the SELinux enforcing mode is enabled.
- Set the SELinux mode to permissive:
1setenforce 0
- Query the SELinux status again.
If the value of Current mode is permissive, the SELinux enforcing mode is disabled temporarily.
The setting becomes invalid after the server is rebooted. When the tool is used, service exceptions may occur.
- Query the SELinux status:
- Disabling SELinux permanently
- Query the SELinux status:
1sestatus
If SELinux status is enabled, SELinux is enabled.
- Open the /etc/selinux/config file:
1vi /etc/selinux/config - Press i to enter the insert mode and change SELINUX=enforcing to SELINUX=disabled.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Restart the server.
1reboot
- Query the SELinux status again.
- Query the SELinux status:
Parent topic: Common Operations