提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 selinux的关闭 1、暂时关闭2、永久关闭3、重新开启selinux4、selinux的模式5、selinux状态查
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
setenforce 0
vi /etc/selinux/config
修改配置项:SELINUX=disabled,默认:#SELINUX=enforcing
# 重启服务器reboot
被永久关闭的selinux,如果需要重新开启,那么需要手动编辑配置文件。如果直接使用:setenforce 0 将会报错:“setenforce: SELinux is disabled”;
vi /etc/selinux/config
将配置项:SELINUX=disabled,改为:SELINUX=enforcing 或 SELINUX=permissive
# 重启服务器reboot
# 查看当前的运行模式getenforce
# 可以查看selinux的概要状态信息sestatus
# 可以查看selinux的详情状态信息sestatus -v
# 临时关闭防火墙systemctl stop firewalld.service# 或者systemctl stop firewalld
# 永久关闭防火墙(必须先临时关闭防火墙,再执行该命令,才能行永久关闭)systemctl disable firewalld.service# 或者systemctl disable firewalld
# 开启防火墙systemctl enable firewalld.service# 或者systemctl enable firewalld
来源地址:https://blog.csdn.net/u010404909/article/details/125411501
--结束END--
本文标题: selinux的关闭
本文链接: https://www.lsjlt.com/news/424308.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0