To turn off SELinux on CentOS 7, you can follow these steps:
Temporarily turn off SELinux (not recommended):
setenforce 0
However, this method is only valid for the current startup and will become invalid after restarting the system.
2. Permanently turn off SELinux:
vi /etc/selinux/config
In the open file, change SELINUX=enforcing to SELINUX=disabled. After saving the file, restart the system to take effect.