There are times when you might want to disable or enable SELinux in order to accomplish certain tasks. SELinux can get in the way of installing applications or, in some instances, running applications. In either case, you might want to disable SELinux or set SELinux to Permissive mode.
You can make these changes temporarily or permanently. A temporary change will last until you change it or reboot the machine. A permanent change will last until you edit the configuration file.
For temporary changes you can issue one of the following commands (as the root user):
To disable SELinux issue the command echo 0 > /etc/selinux/enforce
To enable SELinux issue the command echo 1 > /etc/selinux/enforce
The temporary change will take effect immediately.
To permanently make these changes you will need to edit the /etc/selinux/config file (as the root user). In that file you will add (or edit the line)
and set it to either disabled, enabled, or permissive.
Once you make that change, reboot your machine for it to take effect.