Turn off the Selinux,linux run level

Source: Internet
Author: User

1. Modify/etc/selinux/config:

Sed-i ' s/enforcing/disabled/g '/etc/selinux/config, requires a reboot to take effect

Temporary shutdown:

Getenforce:

Setenforce 0

2.linux RunLevel

0:halt, System shutdown status, the system default operation level cannot be set to 0, otherwise it will not start normally
1:single user used, single user working state, root privilege, for system maintenance, prohibit remote login
2:multiuser, multi-user status (no NFS)
3:full multiuser mode, full multi-user status (with NFS), login to console command line mode
4:unused, System not used, reserved
5:x11 console, enter GUI mode after login
6:reboot, the system shuts down gracefully and restarts, the default runlevel cannot be set to 6, otherwise it will not start normally

The operating level principle:
1. There are many server scripts under directory/ETC/RC.D/INIT.D, commonly referred to as services (service)
2. There are 7 directories named RCN.D under/ETC/RC.D, corresponding to the 7 RunLevel of the system
3. RCN.D directories are symbolic link files that point to a service script file under the INIT.D directory, with a naming convention of k+nn+ service name or s+nn+ service name, where NN is a two-digit number.
4. The system will enter the corresponding RCN.D directory according to the specified RunLevel, and retrieve the linked files under the directory in the order of file name.
For files starting with K, the system terminates the corresponding service
For files beginning with S, the system will start the corresponding service
5. View run levels by: RunLevel
6. Go to other RunLevel by: Init N
7. Also init0 for shutdown, init 6 reboot system

To modify the default level:/etc/inittab:

Id:5:initdefault:

Turn off the Selinux,linux run level

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.