Set the boot sequence for Linux services

Source: Internet
Author: User

 We know that in Linux systems, the startup script of system services is generally stored in the/etc/init. d directory. Different boot modes correspond to the/etc/rcX. d directory respectively. In fact, files on/etc/rcX. D are generally linked to the corresponding files under the/etc/init. d directory. We also know that/etc/rcX. the file name under D is in the S + number or K + number header. Here, s indicates start, and K indicates close, the value following it indicates the order in which the service is started or exited. So how are these values? Do you need to modify the file name in/etc/rcX. D? The answer is no. What should we do?

Open the script under/etc/init. d and look for a sentence similar to the following:

# Chkconfig: 2345 64 36

Here 64 is the start sequence value, and 36 is the exit sequence value. If you need to change the sequence, change it here. Then run the following command:

# Chkconfig -- del servicename

# Chkconfig -- add servicename

# Chkconfig servicename on

 

Servicename corresponds to your service name.

 

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.