Centos6 view SELinux status close SELinux

Source: Internet
Author: User
SELinux (Security-EnhancedLinux) is the implementation of mandatory access control by the National Security Agency (NSA) and the most outstanding new Security subsystem in Linux history. Under such access control system restrictions, a process can only access the files required in its tasks. SELinux is installed on Fedora and RedHatEnterpriseLinux by default. Although SELinux is very useful, we still disable it in most cases, because SELinux (Security-Enhanced Linux) is the implementation of mandatory access control by the National Security Agency (NSA, is the most outstanding new security subsystem in Linux history. Under such access control system restrictions, a process can only access the files required in its tasks. SELinux is installed on Fedora and Red Hat Enterprise Linux by default.

Although SELinux is easy to use, we disable it in most cases, because using SELinux without knowing its mechanism will cause software installation or application deployment failure.

 

The following describes how to disable SELinux:


System version: centos 6.5 mini


1. View selinux status
View the detailed status of selinux. if it is enable, it indicates that selinux is enabled.
#/Usr/sbin/sestatus-v


View selinux mode
# Getenforce


2. disable selinux
2.1: permanently shut down (this will take effect after the server is restarted)
# Sed-I's/SELINUX = enforcing/SELINUX = disabled/'/etc/selinux/config


2.2: Temporary shutdown (effective immediately, but invalid after server restart)
# Setenforce 0 # set selinux to permissive mode (that is, disable it)
# Setenforce 1 # set selinux to enforcing mode (enable)


In this way, SELinux is disabled. when the installation software encounters problems, you can disable SELinux before installing 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.