TurnKey Linux Virtual Appliance Library

how to shutdown apache2 in lucid beta?

bassdscho's picture


I want to install an apache2 in my tklpatch. How can I stop apache2 in the lucid beta appliance? I use this appliance to apply a patch to the same iso.

I tried "/etc/init.d/apache2 stop" but the file doesn't exist!

Jeremy Davis's picture

I reckon its because of upstart

A number of services are now handled by upstart in Ubuntu (such as SSH, Apache, MySQL and others). I'm not sure but I reckon that's the problem.

I haven't tested myself but try

service apache stop 


initctl stop apache

I'm not sure how you actually disable services though (they should spawn again after a restart with the above commands) although that may not be relevant to your current needs. I also came across an article here which I have only skimmed but looked like it could be useful if you want some more info.

Liraz Siri's picture

stop, start, status, etc.

Upstart does things a bit differently, but it's actually not harder, just different.
# start, stop, status are all symlinks to initctl

stop myservice
start myservice
status myservice

man initctl
Jeremy Davis's picture

Thanks Liraz

Always better to have a fully informed solution, than a semi-informed jab in the dark! :)

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)