1. Problem
Recent learning Kubernetes
,needs 设置永久关闭SELINUX
,results , 修改错了一个SELINUX配置参数
leading 关机重新启动后
to 无法进入CentOS7系统
,.卡在启动进度条界面
2. Solve
After restarting several times, it was found in the startup log Faild to load SELinux poilcy
that it should be 修改错了一个SELINUX配置参数
, causing 无法加载SELINUX相关配置。
and affecting the normal startup of the system.
2.1 Operation
Restart the CentOS7 system. In this interface, 按e键
- means edit the selected item
editing the selected entry.
2.2 Add selinux=0 to temporarily close selinux configuration
Use 向下的方向键
, find 以 linux16开头的那一段配置
, 段末尾处
add a configuration sentence, 空格键隔开
selinux=0
and then press ctrl x
the key combination to express start
.
This configuration selinux=0
is 临时关闭selinux的配置
equivalent to execution setenforce 0
. 正确配置
It should look like the picture below:
成功进入系统
:
2.3 Reset to permanently close SELINUX
vi /etc/sysconfig/selinux
Will 因为修改SELINUX配置文件出错导致Faild to load SELinux poilcy无法进入CentOS7系统
, 错误配置SELINUXTYPE=disabled删除
, 重新进行配置设置永久关闭SELINUX
that is 配置SELINUX=disabled
.
正确配置
It should look like the picture below:
Use the cat command 查看是否修改成功
:cat /etc/sysconfig/selinux
2.4 Restart the system
There are no errors in the startup log Faild to load SELinux poilcy
. :
成功进入登录界面
成功登录(root用户在名为freedomdjc主机上登录成功),问题成功解决