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