gpt4 book ai didi

amazon-web-services - AWS CentOS SELinux 卡住系统

转载 作者:行者123 更新时间:2023-12-04 19:44:11 25 4
gpt4 key购买 nike

我在 AWS EC2 上设置了一个新的 CentOS 实例,每当我禁用 SELinux 时,我的系统都会卡住并出现以下错误 -

无法加载 SELinux 策略,卡住。

我通过编辑配置文件并附加禁用来禁用 SELinux。

您能否告诉我如何在不卡住 AWS 上的实例的情况下永久禁用 SELinux。

谢谢

最佳答案

编辑文件/etc/selinux/config 并将这一行更改为该值

SELINUX=disabled

(注意 1. 这不是/etc/sysconfig/selinux,一个应该是另一个的链接,但由于您的系统无法正常运行... 2. 我之前说的是“禁用”而不是“禁用”抱歉)
然后重启

https://www.centos.org/docs/5/html/5.1/Deployment_Guide/sec-sel-enable-disable.html

为了消除文件损坏,试试这个

perl -p -i -e 's/^SELINUX=(\S+)/SELINUX=disabled/'/etc/selinux/config

关于amazon-web-services - AWS CentOS SELinux 卡住系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39422874/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com