Debian system startup script-Linux Release Technology-Debian information. The following is a detailed description. Debian GNU/Linux uses the SysV module as the system initial script. Like RH, Debian uses an extended SysV module, while Slackware is mainly based on BSD, And has written several convenient scripts to use the SysV module.
Locate the SysV directory
Debian GNU/Linux stores related directories under the/etc directory like most systems using the SysV module. That is to say, the SysV directory/etc/init. d is the script itself, and/etc/rc1.d,/etc/rc2.d until/etc/rc6.d is a special running level directory. The scripts for managing all these are/etc/rc. d/rc.
However, RH stores all the SysV directories under the/etc/rc. d directory. That is to say, RH uses/etc/rc. d/init. d instead of/etc/init. d. For compatibility, RH creates links to related directories under/etc/rc. d.
Work with Debian Tool
RH contains some tools used to automatically manage the initial SysV script process, that is, chkconfig civilian service. Debian also includes these tools, but provides similar management tools: update-rc.d and invoke-rc.d.
Use update-rc.d
The update-rc.d of Debian is similar to the chkconfig tool of RH. However, chkconfig is a binary program, while update-rc.d is a Perl script. These tools have different command line options, but execute similar functions. The following table lists some usage of the update-rc.d. If you want to view the complete information, you can view the related and album pages.
Command function
Update-rc.d-f Remove removes the specified service from all running-level configuration directories.
Update-rc.d Start Configure the service to start in the specified order in the running level list
Update-rc.d Stop Configure the service to stop in the sequence specified in the running level list
The biggest difference between the update-rc.d and the RH chkconfig is that the update-rc.d is set so point to/etc/init. the run-level link of the Service script under the d directory, while chkconfig requires separate service configuration at each run level. Essentially, this means that every time we use update-rc.d to change a runtime level, we have to change everything. For example, the following command sequence works the same as the command chkconfig-level 2345 inetd off:
The first command removes all points to/etc/init. the run-level link of the d/inetd service script, the-f flag will make the update-rc.d handle it even if the inetd script already exists. The second command creates a stop script with a service level of 20 at each running level. For example, this creates a symbolic link for/etc/rc3.d/K20inetd to Disable inetd running in runlevel 3. (Here, we need to note that we want to display the Add reboot and shutdown running levels, that is, 0 and 6, only that all services are set to "stop"). In another example, the commands shown below will allow inetd to run at runtime Level 3 to 5, and are not allowed at other runtime levels:
Debian's update-rc.d initially seemed confusing, but once we understood it, we could see how well he could do our work.
Use invoke-rc.d
The equivalent of the RH service command In Debian is the invoke-rc.d. These two commands have the same effect in most cases. For example, service inetd start has the same effect as invoke-rc.d inetd start (to start the inetd service, the command to stop the service is the invoke-rc.d inetd stop ). Invoke-rc.d commands also have an additional command parameter that we can look into in depth, but in general these two commands are the same.
Different in/etc/inittab
The main configuration file during system initialization is/etc/inittab. This file is used to manage the script at system startup. The following are the differences between the inittab file and other releases:
1 Debian's default running level is 2.
2 Debian does not configure the X Window System Display Manager in the/etc/inittab file.
3. The running level 2 and 3 are the same, while the running level 4 and 5 are the same.
4. Level 4 and 5 run only one virtual terminal, while level 2 and 3 run six.
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:
info-contact@alibabacloud.com
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