As we know, in the CentOS system, the startup script of the system service 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 headers. Here, S indicates start, K indicates close, and the value following it indicates service start or service exit.
As we know, in the CentOS system, the startup script of the system service 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.