Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
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.