The specific usage of UPDATE-RC.D under Ubuntu

Source: Internet
Author: User


Set Boot and stop

sudo update-rc.d <serviceName> start 20 1 2 3 4 5. Stop 60 0 6.

Be sure to note that when written together, the back of the two "." sign must have, or error

Compile and install manually add startup items

Service startup Scripts -- >/etc/rc[0~6].d ( add symbolic Links by format )

Apache2 Example:

sudo cp/usr/local/apache2/bin/apachectl/etc/init.d/apache2

sudo ln-s/etc/init.d/apache2/etc/rc2.d/s80apache2

Note: Ubuntu The run level is 2

Start, stop service

Service Apache2 Stop

Service Apache2 Restart

Set up boot from
sudo update-rc.d apache2 start 80 2 3 4 5.

sudo update-rc.d apache2 Stop 80 0 1 6.

Equivalent to

sudo update-rc.d apache2 defaults 80 80

Note: The first one the Representative Start , a second the Representative Stop

Remove Boot Boot

sudo update-rc.d-f apache2 Remove

System Start-up process

Kernel /etc/init/rc-sysint.conf,/etc/inittab, ETC/INIT.D/RC,/ETC/RC[0~6].D,/etc/init.d/ Rc.local->/etc/rc.local

although in Ubuntu in later versions, the default is no longer available. Inittab file, but I can add it on my own.

the above start-up process is not representative of all, to Redhat series of CentOS5 For example:

Kernel /etc/inittab,/etc/rc.sysinit (/etc/rc.d/rc.sysinit),/etc/rc[?]. D (/etc/rc.d/rc[?). d)/etc/rc.local (/etc/rc.d/rc.local)



This article is from the "FLY" blog, please be sure to keep this source http://xpf999.blog.51cto.com/2520716/1762281

Specific usage of update-rc.d under Ubuntu

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

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