Centosselinux is disabled without restarting

Source: Internet
Author: User
To disable SELinux, modify selinux & quot; in the/etc/SELINUX/config file to "disabled" and restart. If you do not want to restart the system, run the setenforce0 command. note: setenforce1 sets SELinux to enforcing mode. setenforce0 sets S...

To disable SELinux:
Modify selinux = "" in the/etc/SELINUX/config file to disabled, and then restart.
If you do not want to restart the system, run the setenforce 0 command.
Note:
Setenforce 1 sets SELinux to enforcing mode
Setenforce 0 sets SELinux to permissive mode
Add selinux = 0 to the startup parameters of lilo or grub. you can also disable selinux.

#---------------------------------------------------------------
View selinux status:
/Usr/bin/setstatus-v
As follows:
SELinux status: enabled
SELinuxfs mount:/selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 21
Policy from config file: targeted
 
Getenforce/setenforce view and set the current working mode of SELinux
#-----------------------------------------------------------------------
Once the service is started, it immediately stops. search for information on the Internet and disable SELinux before installing MySQL. The steps are as follows:

1. disable SELinux and restart the system;
2. install MySQL (MySQL server should be able to start );
3. enable SELinux and restart the system. then the MySQL server can start normally.

Enable SELinux:

Vi/etc/selinux/config (also known as the/etc/sysconfig/selinux file)

SELINUX = disable SeLinux

SELINUX = enforcing enable SeLinux

 

This article is from "Qian-serving the people"
 

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.