How can I keep Apache stopped on Ubuntu? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionActually, I want something like WAMP (for Windows). Th开发者_高级运维e Apache service should be always stopped. Whenever I need it to be running, I go to the Start Menu and turn it on. Is there a way to make it possible on Ubuntu?
Remove apache "autostart" from runlevels with the following:
sudo update-rc.d apache2 remove
Make a script with the following:
#!/bin/bash
gksudo /etc/init.d/apache2 start
Make it runnable
chmod 0755 apache-starter-shell-script-name
And run it when you want to start apache.
I think this is more a serverfault.com question.
Nevertheless you could modify your runlevel configuration (Ubuntu uses upstart instead of init) and then start apache manually from the console when you need it.
Unfortunately I don't know the upstart configuration options by mind but I think some googling for it's configuration should help you.
Edit: Maybe Boot-Up Manager is what you need (http://www.marzocca.net/linux/bum.html) - I don't use Ubuntu as desktop.
Edit2: Try
sudo update-rc.d apache2 disable
精彩评论