Debian service Management

Source: Internet
Author: User
Debian service Management-Linux Release Technology-Debian information. See the following for details. Compared with the RH series ntsysv, Debian also has a similar service management software rcconf. This is a very simple management software, which is managed through a text window. to use it, you also need to download and install it.

Apt-get install rcconf

Enter rcconf in shell.

Of course, I just want to transform Debian into a web service or firewall Service. I also don't want to install other software that is rarely used. do not install rcconf. directly using Debian built-in update-rc.d is also a good choice. the disadvantage is that the intuition is too poor and the interface is not friendly.

The following example shows that the service is automatically started at the running level when the system is started.

Edit the script in/etc/init. d and grant the executable permission

'S ': indicates that 'K' is started with the system, indicating that it is stopped with the system.

For example, add a service that starts with the system in rc2.d.

Create a shellname script in/init. d to write the work you want to complete in the script.

Enter the following command:

/Usr/sbin/update-rc.d shellname start 20 2. Stop 17 0.


Shellname: indicates your script name.

Start: Indicates starting with startup.

20: indicates the number at startup, and the number starts successively by size.

2: indicates the running level. The default running mode of debian is 2.

. : End. There is a "after start 20 2 "." It indicates that the random start is set to end, and there will also be one at the end of the stop, which must be filled in!

Stop: a service that stops when the system starts.

You can also use the default configuration.

For example, create k17 shellname to/init. d/shellname in rc0.d to stop the service.

Update-rc.d shellname defaults

Delete startup Service

/Usr/sbin/update-rc.d-f shellname remove
Related Article

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: 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.