
今天易秋網絡老易售后的時候,遇到一個問題,centos 7.x重啟后機器就報 Failed to load SELinux policy. Freezing 錯誤導致一直不能啟動。怎么解決了,百度了一下,其實相當簡單的。
解決辦法:
1. 重啟時在啟動頁面,選擇你要啟動的內核 按 e, 進入 grub 編輯頁面。

2. 找到 linux16 那一行,在language 后面 也就是LANG=zh_CN.UTF-8,空格 加上 selinux=0 或者 enforcing=0 (備注:我是加入selinux=0 生效的。)
3. 然后 ctrl + x 啟動,就看到熟悉的登錄界面。
4 .修改selinux配置文件,正確關閉selinux ~!
vim /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=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
修改完畢后,重啟。查看是否會報錯 。over。
教程參考:
https://www.cnblogs.com/yoyotl/p/7489048.html
https://blog.51cto.com/qulei616/1933840