|
本帖最后由 jiawang 于 2018-1-26 16:13 编辑
查看SELinux状态:默认SELinux status参数为enabled即为开启状态
[root@rac01 ~]# /usr/sbin/sestatus -v
SELinux status: enabled
[root@rac01 ~]# getenforce
Enabled
关闭SELinux:
1、临时关闭 (不用重启机器)设置SELinux 成为permissive模式
[root@rac01 ~]# setenforce 0
[root@rac01 ~]# getenforce
Permissive
2、永久关闭(修改配置文件需要重启机器)
修改/etc/selinux/config 文件
[root@rac01~]# 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=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
将SELINUX=enforcing改为SELINUX=disabled
重启机器即可 (reboot)
验证:
[root@rac01 ~]# /usr/sbin/sestatus -v
SELinux status: disabled
[root@rac01~]# cat /etc/selinux/config
[root@rac01 ~]# 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 three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
|
|