When installing the database, the default is to turn off SELinux, the following commands we need to remember, in the wrong time may be used. Do not have any command to see the document, to professional.
1. Version
[[email protected] ~]# uname -aLinux roidb01 3.10.0-123.el7.x86_64 #1 SMP Mon May 5 11:16:57 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux[[email protected] ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo)[[email protected] ~]#
2. View commands
[[email protected] ~]# getenforce ##查看selinux 状态Disabled[[email protected] ~]# [[email protected] ~]# setenforce 0 ##临时关闭selinux setenforce: SELinux is disabled[[email protected] ~]# [[email protected] ~]# sestatus ##查看selinux 状态SELinux status:
3. Configuration files
[[email protected] ~]# 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 ##默认为enforcing ,修改为disable,重启操作系统init 6# SELINUXTYPE= can take one of these two values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected. #
Rhel 7 SELinux