Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have lots of servers installed (Apache, MySQL, etc.), but I don't want them all to start at boot time (they drain power, and I'm on batteries most of the time). How do I configure this?

share|improve this question

5 Answers 5

up vote 32 down vote accepted

In the console, you could write:

sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
...

For additional information read Ubuntu Bootup How to.

share|improve this answer

This link is a bit out dated version wise, but does it match an option in your version?

Configure startup services

This requires administrative privileges (see Chapter 2, Administrative Tasks).

  1. Run Services Settings: SystemAdministrationServices.
  2. Enter your password.
  3. Select the services you want running, then click OK when done.
share|improve this answer
    
The link is broken now (404). –  Peter Mortensen Nov 19 '11 at 10:26

Things have changed quite a bit in Ubuntu now. I think from version 11 onwards. MySQL is handled by Upstart while Apache still uses traditional SysV init scripts

For MySQL, you can use the new override feature in Upstart to modify the starting behaviour:

sudo echo "manual" >> /etc/init/mysql.override

For more info, see the section "Disabling a Job from Automatically Starting" in the Upstart Cookbook.

As Apache still uses the traditional SysV init scripts you can use

sudo update-rc.d -f apache2 remove

to remove the links from /etc/rcX.d or, alternatively use

sudo update-rc.d apache2 disable

which "disables" the script by changing it from a start script to a stop script. This is reversible by

sudo update-rc.d apache2 enable


Most of this information I got from here: http://askubuntu.com/a/40077/24678

share|improve this answer
1  
Can you please include the relevant portions of that page in your answer? Just in case the link ever breaks or the article is retired. –  Taegost Aug 14 '13 at 15:00
1  
@Taegost - updated as requested –  Wavesailor Aug 16 '13 at 11:42

Another way to accomplish this is to 'disable' the sym link - not delete it.

sudo update-rc.d mysql disable 2

This will rename the sym link to start with 'K' and the service won't start-up on boot. You can then re-enable it at any time if you do decide you want it to start-up on boot.

share|improve this answer

You can use Boot-Up Manager for start and stop boot-up scripts, without the necessity to handle thru complex links and permissions.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.