Linux Basic notes--[021]--"RHEL6 series of Open, shutdown scripts"

Source: Internet
Author: User

First, the system script location and meaning

    • /etc/inittab,/etc/init/* storage switch machine configuration file
    • /etc/init.d/* service script, is a soft link to/etc/rc.d/init.d/
    • /ETC/RC.D The switch scripts that store each operating level, are soft links to the/ETC/INIT.D directory
    • The/ETC/RC.LOACL system starts the last stage of execution of the script, you can write commands that need to run directly in this file

II. basic syntax for startup scripts

As shown below, the Chkconfig line "2345" refers to the default at 2, 3, 4, 54 level boot Run, "12", "88" respectively refers to the script in the open, shutdown phase of the execution sequence (/etc/rc.d/rcx.d/directory, the start of the script starts with s), K does not start, and script names are sorted in the same order as the boot sequence! )

#!/bin/2345# description:xxxx

Third, the use of chkconfig

After the previous section, the script is ready to be added or removed with the following command to boot

Chkconfig---del NAME Note: A    Soft link to add or remove scripts in/etc/rc.d/rcx.d/chkconfig [ --level NUM] NAME on|off| Reset Note: Set the startup status of the script or reset it to the default state in the script, which can be  The--level option indicates the specific runlevel to start randomly

Chkconfig--list
Note: Displays the boot-up script information in each runlevel

Linux Basic notes--[021]--"RHEL6 series of Open, shutdown scripts"

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.