CentOS 7.X off SELinux

Source: Internet
Author: User

1. View
[root@dev-server ~]# getenforceDisabled[root@dev-server ~]# /usr/sbin/sestatus -vSELinux status: disabled
2. Temporary closure
##设置SELinux 成为permissive模式##setenforce 1 设置SELinux 成为enforcing模式setenforce 0
3. Permanently closed
vi /etc/selinux/config

Change Selinux=enforcing to Selinux=disabled
Requires a restart to take effect after Setup

CentOS 7.0 View selinux status | off | open

When Linux is installed, it is usually the case that SELinux is turned on by default, which causes the installation of some services to be unsuccessful.

It can be completely closed if not needed, here is how to view it in CentOS 7.0 and turn off SELinux.

View selinux Status
[[email protected] ~]# sestatus  SELinux status:                 enabled  SELinuxfs mount:                /sys/fs/selinuxSELinux root directory:         /etc/selinuxLoaded policy name:             targeted  Current mode:                   enforcing  Mode from config file:          enforcing  Policy MLS status:              enabled  Policy deny_unknown status:     allowed  Max kernel policy version:      28
temporarily closed
[[email protected] ~]# setenforce 0
permanently closed

You can modify the configuration file/etc/selinux/config to set the SELinux to Disabled.

[[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=enforcing   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.   SELINUXTYPE=targeted [[email protected] ~] # sestatus   SELinux status:                 disabled

CentOS 7.X off SELinux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.