Original address: http://www.cnblogs.com/niocai/archive/2012/07/12/2587780.html
Sometimes we like to install it as a service in Linux, and then we can use the service to manage it for ease of management.
But when we run the command to install the service, assume that the service name is MyService
#chkconfig--add MyService
Will often appear
Service MyService does not support Chkconfig
We usually add the following two sentences at the beginning of the script #gedit/etc/init.d/myservice
Add the following two sentences to #!/bin/bash.
# chkconfig:2345 # Description:myservice ....
Where 2345 is the default boot level, with a level of 0-6 and a total of 7 levels.
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
10 is the start priority, 90 is the stop priority, the priority range is 0-100, the greater the number, the lower the priority.
Service XXX does not support Chkconfig