差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:selinux [2013/09/30 23:42] – [参考文献] ともやん | linux:selinux [2021/12/10 04:47] (現在) – [SELinuxを永続的に無効にする] ともやん | ||
---|---|---|---|
行 21: | 行 21: | ||
</ | </ | ||
+ | ===== SELinuxをパーミッシブモードに変更 ===== | ||
+ | | ||
+ | < | ||
+ | $ sudo setenforce 0 | ||
+ | </ | ||
+ | | ||
+ | < | ||
+ | $ sudo setenforce 1 | ||
+ | </ | ||
+ | |||
+ | ===== SELinuxを永続的に無効にする ===== | ||
+ | < | ||
+ | $ sudo vi / | ||
+ | </ | ||
+ | <WRAP prewrap 100% mincode> | ||
+ | <code autoconf> | ||
+ | # This file controls the state of SELinux on the system. | ||
+ | # SELINUX= can take one of these three values: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # See also: | ||
+ | # https:// | ||
+ | # | ||
+ | # NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also | ||
+ | # fully disable SELinux during boot. If you need a system with SELinux | ||
+ | # fully disabled instead of SELinux running with no policy loaded, you | ||
+ | # need to pass selinux=0 to the kernel command line. You can use grubby | ||
+ | # to persistently set the bootloader to boot with selinux=0: | ||
+ | # | ||
+ | # grubby --update-kernel ALL --args selinux=0 | ||
+ | # | ||
+ | # To revert back to SELinux enabled: | ||
+ | # | ||
+ | # grubby --update-kernel ALL --remove-args selinux | ||
+ | # | ||
+ | # | ||
+ | SELINUX=disabled | ||
+ | # SELINUXTYPE= can take one of these three values: | ||
+ | # | ||
+ | # | ||
+ | # mls - Multi Level Security protection. | ||
+ | SELINUXTYPE=targeted | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 設定を反映させるためには再起動する必要がある。 | ||
+ | < | ||
+ | $ sudo reboot | ||
+ | </ | ||
+ | |||
+ | ===== 関連パッケージの削除 ===== | ||
+ | CentOS | ||
+ | < | ||
+ | $ sudo yum remove selinux-policy selinux-policy-targeted | ||
+ | </ | ||
+ | |||
+ | CentOS 7 | ||
+ | < | ||
+ | $ sudo yum remove selinux-policy selinux-policy-targeted | ||
+ | $ sudo yum remove policycoreutils | ||
+ | </ | ||
+ | ※ Gnome デスクトップでは policycoreutils を削除できない。\\ | ||
+ | |||
+ | Fedora | ||
+ | < | ||
+ | $ sudo dnf remove selinux-policy selinux-policy-targeted \ | ||
+ | setroubleshoot setroubleshoot-plugins setroubleshoot-server \ | ||
+ | policycoreutils-python | ||
+ | $ sudo dnf remove policycoreutils | ||
+ | </ | ||
+ | ※ Gnome デスクトップでは policycoreutils を削除できない。\\ | ||
===== 参考文献 ===== | ===== 参考文献 ===== | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// | ||
[[http:// | [[http:// |