关闭selinux功能

关闭selinux的功能

1. 首先查看下selinux的状态,命令:getenforce

[[email protected] ~]# getenforce 
Disabled

2. 查看selinux的配置文件,命令:cat /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 these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

3. 把SELINUX=enforced改为SELINUX=disabled

方法1:vi编辑器修改

方法2:sed命令:sed –I ‘s#SELINUX=enforced#SELINUX=disabled#g’

4. 修改后的文件需要重启才能生效,但是企业服务器24小时是不能关机重启的。所以需要另外一种方法,可以使用setenforce命令设置临时生效关闭,不用重启生效。

命令:setenforce 0

时间: 2024-08-10 02:11:02

关闭selinux功能的相关文章

Linux下开启关闭SeLinux

SELinux (Security-Enhanced Linux) in Fedora is an implementation of mandatory access control in the Linux kernel using the Linux Security Modules (LSM) framework. Standard Linux security is a discretionary access control model. Discretionary access c

关闭selinux知识小结

今天有人问我,哎,福星,关闭selinux这块我还有点蒙,能给我分析分析么? selinux是什么? 1.     我的简单理解:selinux是一套安全的机制,在学习环境下建议关闭,功能方面可以一些机制所替代.比如防火墙等系列安全措施 selinux一定要关闭么? 1.     没有基础又不愿意倘坑的小伙伴可以关闭,工作中环境大都不开启 2.     开启的坏处是使用中需要倘很多的坑,如果有面对困难的勇气,那就别管它 修改selinux运行状态的相关 setenforce  1 | 0    

开启、关闭selinux

selinux是NSA对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统.但正是因为功能太强大,导致很多时候工作不方便进行,所以有些情况需要关闭selinux. selinux下有两个重要的文件/etc/sysconfig/selinux 和 /etc/selinux/config /etc/sysconfig/selinux是/etc/selinux/config文件的软连接 查看selinux状态命令 disabled为关闭 enbledw为开启 下面两个命令功能相同 [[em

SELinux功能

SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统.NSA是在Linux社区的帮助下开发了一种访问控制体系,在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件.SELinux 默认安装在 Fedora 和 Red Hat Enterprise Linux 上,也可以作为其他发行版上容易安装的包得到.SELinux 是 2.6 版本的 Linux 内核中提供的强制访问控制(MA

【linux系统优化】关闭Selinux

Selinux:SELinux(Security-EnhancedLinux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统. 虽然是一个安全功能,可是由于功能太多了,什么都要管,所以用起来反而更麻烦,因而可以把它关闭,进而使用其它的安全方式替代. [1]查看Selinux运行的3种模式 [[email protected] ~]#cat /etc/selinux/config     #此为Selinux的配置文件目录 # This filecon

CentOS工作内容(二)关闭SELinux

CentOS工作内容(二)关闭SELinux CentOS安装完成后,有很多配置要改,不过最重要就是关闭SELinux SELinux是增强安全性的一项功能,不是SELinux不好,而是当功能安全性较高时会带来很多不便 为了初学者和管理者使用方便,我们建议关闭SELinux,以免安装或配置服务时发生不必要的错误 用到的快捷键 tab 自动补齐(有不知道的吗) ctrl+a 移动到当前行的开头(a ahead) ctrl+u 删除(剪切)此处至开始所有内容 vim 末行模式下 :ser nu 然后

centos 6.X 关闭selinux

SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统.在这种访问控制体系的限制下,进程只能访问那些在他的任务中所需要文件.SELinux 默认安装在 Fedora 和 Red Hat Enterprise Linux 上. 虽然SELinux很好用,但是在多数情况我们还是将其关闭,因为在不了解其机制的情况下使用SELinux会导致软件安装或者应用部署失败 以下就是关闭SELinux的方法 系统

CentOS 7.X 关闭SELinux

1.查看 [root@dev-server ~]# getenforce Disabled [root@dev-server ~]# /usr/sbin/sestatus -v SELinux status: disabled 2.临时关闭 ##设置SELinux 成为permissive模式 ##setenforce 1 设置SELinux 成为enforcing模式 setenforce 0 3.永久关闭 vi /etc/selinux/config 将SELINUX=enforcing改为

永久关闭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