Find the answer to your Linux question:
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.
  1. #1
    Linux 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?

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    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

  3. #3
    Linux Newbie
    Join Date
    May 2007
    Posts
    106
    Thanks for the quick reply! Two questions.

    Quote Originally Posted by bigtomrodney View Post
    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

    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

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    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.

  6. #5
    Linux 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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •