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