how to turn off SELinux on CentOS 7

Views:

[root@devserver ~]# getenforce
Disabled
[root@devserver ~]# /usr/sbin/sestatus -v
SELinux status: disabled

Temporarily closed:

## Set SELinux into permissive mode
##Setenforce 1 set SELinux into enforcing mode
setenforce 0

Permanently closed:

vi /etc/selinux/config

Change SELINUX=enforcing to SELINUX=disabled