In http://www.aliyun.com/zixun/aggregation/33836.html ">debian/ubuntu Linux, the UPDATE-RC.D command replaces Chkconfig as the default edit/etc/ INIT.D a script-linked package. Unfortunately, the tool is used primarily for editing service links that are currently installed or removed, while the editing of links to existing packages is poorly supported.
Fortunately, however, the packet sysv-rc-conf, which is almost consistent with the chkconfig syntax, brings hope to the distressed administrator that you can start its GUI mode by executing its parameterless command. This section will show you some important tips for using sysv-rc-conf.
Install sysv-rc-conf
SYSV-RC-CONF packages can be installed through apt. as follows:
root@u-bigboy:~# Apt Install sysv-rc-conf
List The running levels of the daemon
This can be done by adding the--list option. In the example below we will list the level of operation of the Apache daemon.
root@u-bigboy:~# sysv-rc-conf--list apacheapache 0:off 1:off 2:on 3:on 4:on 5:on 6:offroot@u-bigboy:~#
Let's take a look at the run level of all daemons.
root@u-bigboy:~# sysv-rc-conf --listacpi-support 0:off 1:off 2:on 3:on 4:on 5:on 6:offacpid 0:off 1:off 2:on 3:on 4:on 5:on 6 : Offalsa-utils 0:off 6:off.........vbesave 2:on 3:on 4:on 5:onx11-common s:onroot@u-bigboy:~#
Set the run level of the daemon
Sysv-rc-conf is very similar to the chkconfig syntax. Let's set the Apache daemon to start automatically at run Level 2 to 5.
root@u-bigboy:~# sysv-rc-conf Apache on
Again, we can set Apache at run Level 2 through 5 with the following command:
root@u-bigboy:~# sysv-rc-conf Apache off
Finally, we set Apache to start only at run Level 3 and 5.
root@u-bigboy:~# sysv-rc-conf--level Apache on