让我们看看如何永久禁用SELinux。 SElinux的配置文件位于 /etc/selinux/config。 因此,我们需要对该文件进行一些修改。
# vi /etc/selinux/config
将 SELinux 属性设置为 Disabled,如下所示:
# 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=disabled
# 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
保存并退出配置文件,然后重新启动CentOS 8 Linux系统。