Chkconfig configures services running at various levels

Source: Internet
Author: User

Chkconfig is frequently used in command line operations. It allows you to conveniently set the services started at the running level of each system. You can easily manage your startup services.

  • To list the startup status of all services in the system:

    # Chkconfig-list

  • To list the mysqld service settings:

    # Chkconfig-list mysqld

  • Set mysqld to be used for startup at levels 3 and 5:

    # Chkconfig-level 35 mysqld on

    -Level 35 indicates that the operation is only executed at levels 3 and 5.

    On indicates start, off indicates close

  • Set mysqld to on:

    # Chkconfig mysqld on

    "Each level" includes 2, 3, 4, and 5 levels

    Level 0: Shutdown

    Level 1: Single User Mode

    Level 2: multi-user command line mode without network connection

    Level 3: multi-user command line mode with network connection

    Level 4: unavailable

    Level 5: multi-user mode with graphic interface

    Level 6: restart

  • How to add a service:

    First, the Service script must be stored in the/etc/INI. d/directory;

    Second, you need to use chkconfig-add servicename to add this service to the chkconfig tool service list. In this case, the service will be stored in/etc/rc. d/rcN. d.

    Finally, you can modify the default startup level of the service as instructed above.

  • Delete A service:

    # Chkconfig-del servicename

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.