콘텐츠로 이동






RHEL8에서 selinux OFF하는방법

back

소개

기존에는 /etc/selinux/config에서 SELINUX=disabled로 설정했는데 RHEL8에서 해당 파일로 변경시 부팅과정 중에 memory leak이 발생할 수 있어 다른 방법으로 변경하라고 합니다.

작업절차 비교

  1. 기존 절차

    $> cat /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
    # SELINUXTYPE= can take one of these three values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected. 
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted
    

  2. 변경절차 (커널 파라미터에서 selinux를 off하도록 설정)

    $> grubby --update-kernel ALL --args selinux=0
    $> cat /etc/default/grub
    ...
    GRUB_CMDLINE_LINUX="resume=123 rhgb quiet selinux=0"
    

  • 시스템 반영을 위해 재부팅 필요



작성일: 2026년 7월 15일 ,  마지막 업데이트: 2026년 8월 3일