"Chkconfig command"-linux command five-minute series four

Source: Internet
Author: User

This original article belongs to the "Linux Greenhouse" blog.

The blog address is http://roclinux.cn.

Article author for Roc

I hope you can donate to support the operation and development of the Linux greenhouse blog. See "About Donations"

==

Chkconfig are often used when operating on the command line. It makes it easy to set up services that start at each system runlevel. This can be mastered well, with proficiency, you can easily manage your start-up services.

  • To list all service startup scenarios for the system:

    # chkconfig–list

  • To list mysqld service settings:

    #chkconfig –list mysqld

  • set mysqld in rank 3 and 5 Run service for boot:

    # chkconfig –level mysqld on

    Indicates that the operation is only in the rank 3 execute

    on means start, Off = Close

  • Set mysqld on each level :

    # Chkconfig Mysqld on

    " levels" include 2, 3, 4, 5 ratings

    Level 0 means: Shutdown

    Level 1 means: Single user mode

    Level 2 : Multi-user command line mode with no network connection

    Level 3 means: Multi-user command line mode with network connection

    Level 4 means: Not available

    Level 5 means: Multi-user mode with graphical interface

    Level 6 means: Reboot

  • 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 list of Chkconfig tool services, where the service is given k/s entry in/ETC/RC.D/RCN.D.

    Finally, you can modify the default boot level of the service by the method that is taught above.

  • To delete a service:

    # Chkconfig–del ServiceName

"Chkconfig command"-linux command five-minute series four

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.