I had reason to disable SELinux on a VM. On CentOS and RHEL you can do temporarily with:

$ sudo setenforce 0

To set permanently, change this flag in the following file:

$ sed 's/SELINIX=enforcing/SELINUX=disabled/' \
    /etc/selinux/config

Filing here because I always forget.