Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I setup a LAMP server on my desktop Ubuntu install for testing web applications. How do I set it to only run when I tell it to rather than at startup? It is not used as a production web server but instead for testing PHP scripts I write before pushing them to my public web server.

share|improve this question
add comment

2 Answers 2

up vote 10 down vote accepted

Remove from start up:

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

Start at will:

sudo service mysql start
sudo service apache2 start
share|improve this answer
1  
Thanks Marco ;) –  wojox Jun 22 '11 at 3:19
    
in 11.10 I've used sudo update-rc.d apache2 disable :) –  Pitto Jan 7 '12 at 20:38
add comment

If that doesn't work, try removing them forcefully.

sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
share|improve this answer
add comment

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.