CentOS 7 はファイアウォールと SELinux をオフにします

1. ファイアウォールをオフにする

1. 一時的にシャットダウンします(次回起動時にファイアウォールが自動的に起動します)

systemctl stop firewalld

2. ファイアウォールのステータスを表示する

systemctl status firewalld

3. ファイアウォールを永続的に無効にします (コンピューターの電源を入れても、ファイアウォールは有効になりません)。

systemctl disable firewalld

2、セリナックスを閉じる

1. selinux ステータスの表示

getenforce

# 输出:Enforcing    启动状态
# 输出:Permissive   关闭状态

2. 臨時休業

# 查看关闭命令参数
setenforce

# 输出:usage:  setenforce [ Enforcing | Permissive | 1 | 0 ]     1 表示启动,0 表示关闭

# 临时关闭
setenforce 0

3. selinux を完全に終了します (恒久的に閉じるように構成ファイルを変更します)。

[root@localhost ~]# 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 three values:
 #     targeted - Targeted processes are protected,
 #     minimum - Modification of targeted policy. Only selected processes are protected.
 #     mls - Multi Level Security protection.
 SELINUXTYPE=targeted

ESC --> :wq 保存

おすすめ

転載: blog.csdn.net/qq_33833327/article/details/130509033