Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I install apache2 from reps. But I need not to use it every day, only if I works on some application. How can I stop auto running of it and run it manually if I need?

My OS is Ubuntu 11.04

share|improve this question
up vote 1 down vote accepted

Install sysv-rc-conf, run it as root, and uncheck the boxes next to the apache2 service.

share|improve this answer
@wombieis it way to do it without additional software? – RiaD Jul 17 '11 at 12:51
Sure, rename the sysv symlinks by hand. sysv-rc-conf is a lot nicer. And you need to get a better font; my name is 'womble'. – womble Jul 17 '11 at 12:55
I need to get better eyes:), sorry. – RiaD Jul 17 '11 at 13:08

You can use update-rc.d utility such as:

sudo update-rc.d -f apache2 remove

To start it manually, you can use:

sudo /etc/init.d/apache2 start
share|improve this answer
The next time the package is upgraded, apache will start again on boot. Please learn to use update-rc.d correctly. – womble Jul 17 '11 at 12:33
@womble: Can you clarify your point please? Is there a better way to use this utility? – Khaled Jul 17 '11 at 13:23
Yes, properly. The manpage reveals all. – womble Jul 17 '11 at 22:42

Your Answer


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.