首页 > 系统服务 > 详细

Linux永久关闭防火墙 firewalld和sellinux设置

时间:2020-06-16 16:49:42      阅读:128      评论:0      收藏:0      [点我收藏+]

 

有时候关了防火墙,下次登录又开了,发现服务起不来,找半天才发现防火墙又开了,真是的,所以建议永久关闭防火墙和selinux

 

关闭 firewalld:

systemctl stop firewalld #临时关闭

systemctl disable firewalld #永久关闭,即设置开机的时候不自动启动

 

--------------------------------------

关闭 selinux:


[root@localhost html]# getenforce #查看selinux状态
Permissive
[root@localhost html]# setenforce 0 #临时关闭
[root@localhost html]# vim
/etc/sysconfig/selinux #永久关闭

永久关闭selinux可以使用vi命令打开/etc/sysconfig/selinux 文件将SELINUX=(disable或permissive)

##重启服务

[root@localhost html]# shutdown -r now (或者reboot简单粗暴)。

##附

setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式

 

Linux永久关闭防火墙 firewalld和sellinux设置

原文:https://www.cnblogs.com/lichenghong/p/13141324.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!