Rhel 7 SELinux

Source: Internet
Author: User

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

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.