Results 1 to 5 of 5
apache starts automatically on booting my Ubuntu 8.04 system. I boot to the GUI by default so I assumed that was runlevel 5. Thus, I renamed
/etc/rc5.d/S91apache2
to
/etc/rc5.d/K91apache2
but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-09-2008 #1Linux Newbie
- Join Date
- May 2007
- Posts
- 106
[SOLVED] Disable apache on boot
apache starts automatically on booting my Ubuntu 8.04 system. I boot to the GUI by default so I assumed that was runlevel 5. Thus, I renamed
/etc/rc5.d/S91apache2
to
/etc/rc5.d/K91apache2
but the service still started after a reboot. Am i on the wrong runlevel? How can i disable apache's automatic start on boot?
- 07-09-2008 #2Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Ubuntu is Debian based so only uses two runlevels rather than the 5 seen in most other distros/Unices. You can disable it with
Code:sudo update-rc.d -f apache2 remove
- 07-09-2008 #3Linux Newbie
- Join Date
- May 2007
- Posts
- 106
Thanks for the quick reply! Two questions.
What file would that command be modifying? I'd like to be able to see what it is doing so I know what is going on.
Also, what is the point of these directories if runlevels 0-6 do not exist?
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc0.d
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc1.d
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc2.d
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc3.d
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc4.d
drwxr-xr-x 2 root root 4096 2008-07-09 09:49 rc5.d
drwxr-xr-x 2 root root 4096 2008-07-07 10:07 rc6.d
-rwxr-xr-x 1 root root 306 2007-10-15 19:17 rc.local
drwxr-xr-x 2 root root 4096 2008-05-08 09:42 rcS.d
- 07-09-2008 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Maybe this will help -
How-To: Managing services with update-rc.d | Debian/Ubuntu Tips & Tricks
Basically update-rc.d manages all of the symlinks in the various runlevels to the original init script in question. In Debian systems runlevels 2-5 are identical but I think they're just left there to allow the more traditional system to be restored if required or possibly for compliance.
- 07-09-2008 #5Linux Newbie
- Join Date
- May 2007
- Posts
- 106
That worked! It changed the links for each runlevel automagically. Also, thanks for the link, it was very useful.
I appreciate your help!




