提供:あわWiki
移動先: 案内検索

ヘルプ:SELinuxの無効化&ファイアウォール停止(AlmaLinux)

メインページ > ヘルプ:目次 > ヘルプ:自宅サーバー構築(AlmaLinux)  > SELinuxの無効化&ファイアウォール停止(AlmaLinux)

SELinuxの無効化

SELinux (Security-Enhanced Linux)を無効にする場合は以下のように設定します。

[root@host4 ~]# getenforce ← SELinux状態確認
Enforcing ← SELinux有効

[root@host4 ~]# setenforce 0 ← SELinux無効化

[root@host4 ~]# getenforce ← SELinux状態確認
Permissive ← SELinux無効

[root@host4 ~]# vi /etc/sysconfig/selinux ← SELinux設定ファイル編集
SELINUX=enforcing
↓
SELINUX=disabled ← システム起動時にSELinuxを無効化

ファイアウォール停止

ルーターでブロックするため、ホスト側では必要なければ停止しておきます。

[root@host4 ~]# systemctl stop firewalld ← ファイアウォール停止

[root@host4 ~]# systemctl disable firewalld ← ファイアウォール自動起動解除

Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.