开发者

How can I keep Apache stopped on Ubuntu? [closed]

开发者 https://www.devze.com 2023-03-31 05:44 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

Actually, 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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号