업무/sys

[Linux] CentOS SELinux 비활성화

sysops 2021. 11. 15. 00:30
728x90

설치 환경 

- CentOS 8

- CentOS 7

- CentOS 6

 

1.  SELinux 설정 확인

[root@sysops]# sestatus
[root@sysops]# sestatus | grep 'SELinux status\|Current mode'
SELinux status:                 enabled
Current mode:                   enforcing

 

2. 일시적으로 비활성화시키기

[root@sysops]# setenforce 0
[root@sysops]# sestatus | grep 'SELinux status\|Current mode'
SELinux status:                 enabled
Current mode:                   permissive

 

3. 영구적으로 비활성화시키기

[root@sysops]# vim /etc/selinux/config
...
SELINUX=disabled   #수정
[root@sysops]# reboot
[root@sysops]# sestatus
SELinux status:                 disabled

 

728x90