Selinux 비활성화 하기
기본적으로 SELINUX는 활성화 되어 있다. 서버 작업시 SELINUX 로 인해 제한을 받는 경우아 종종 발생하게 되는데
아래와 같이 SELINUX 를 disabled 로 변경하면 비활성화가 된다.
SELINUX=disabled
SELIX 설정 파일은 아래와 같다.
Centos : vi /etc/sysconfig/selinux
Ubuntu : vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing ## ==> SELINUX=disabled 로 변경.
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
바로 적용은 되지 않으며 재부팅을 해야 적용이 된다.
재부팅을 하지 않고 현재 접속된 터미널에 한해 변경된 내용을 적용하고 싶을 경우 다음의 명령어를 실행하면 된다.
/usr/sbin/setenforce 0