SELinux に思わぬ罠があるとは思いませんでした
Apache の環境設定を行っている最中に不幸が発生しました
Apache を起動している時に、アクセス違反のエラーが表示しているのにも関わらず
何度も同じ操作を行っていると・・・・Apacheが起動しなくなりました
また、SELinux を無効にしても Apache は起動しなくなりました
同じ事をするかもなので
SELinux 無効化方法をまとめとこ
■SELinux無効化方法
①.vi /etc/sysconfig/selinux
②.以下の内容を変更します。
【変更前】
# 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 - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
【変更後】
# 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 - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
③.reboot
※.再起動する事で反映されます
■注意事項
OS導入後、直ぐに設定しないと筆者みたいに再インストールが必要になるかもです
SELinuxは危険だよ!!
この記事を書いている人
よし
某企業のSEとして社会に貢献している状態です。
また、2005年から自宅にサーバを構築するようになり
以下のタイミングで再構築など実施しています。
・玄箱HG(2005年11月~2007年5月)
・OpenMicroServer (2007年5月~2008年7月)
・MP965-D(2008年7月~2011年5月)
・SuperMicro(2011年5月~2014年12月)
・D54250WYB(2014年12月~現在)