栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Centos7关闭防火墙和SELinux

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Centos7关闭防火墙和SELinux

关闭防火墙

查看防火墙状态

systemctl status firewalld.service 

关闭防火墙

systemctl stop firewalld.service 

关闭防火墙开机启动

systemctl disable firewalld.service 

关闭SELinux

查看SELinux状态

getenforce

临时关闭SELinux

setenforce 0

临时打开SELinux

setenforce 1

永久关闭SELinux

将SELINUX=enforcing改为SELINUX=disabled,保存后退出后,下次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=enforcing
SELINUX=disable
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/604104.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号