[ubuntu-us-mi] run apache and mysql as services at startup
jlay1984@live.com
jlay1984 at live.com
Tue Sep 20 12:01:11 UTC 2011
Sent from my HTC smartphone on the Now Network from Sprint!
----- Reply message -----
From: "Julia Christianson" <julia at nscjc.net>
To: "Ubuntu Michigan Local Community Team" <ubuntu-us-mi at lists.ubuntu.com>
Subject: [ubuntu-us-mi] run apache and mysql as services at startup
Date: Mon, Sep 19, 2011 7:42 am
Eric,
I haven't done much with services in Ubuntu, only Red Hat/Centos, so not an expert here, but I did notice that you said
sudo update-rc.d apache2 default
but the syntax actually is
sudo update-rc.d apache2 defaults
('s' on the end of 'defaults'). So I'd suggest you put the scripts back like they were and try update-rc.d with 'defaults'.
What's going on here: In order to get a service to start in a particular runlevel, you need a file in the appropriate /etc/rc*.d directory that starts with a capital S followed by a two-digit number and the name of the service. This file is actually just a symlink to the script that starts the service, e.g. /etc/rc2.d/S38httpd -> /etc/init.d/httpd.
**BUT** (a) I only say rc2.d because someone just said that's the default runlevel for Ubuntu (I never have been clear on that), (b) I just made up '38'; the numbers indicate the order of execution and it can be important, and (c) I'm not even sure that 'httpd' is the name of the script in /etc/init.d/, all of which indicate it's better to get something like update-rc.d to make that symlink for you.
-- Julia
--
ubuntu-us-mi mailing list
ubuntu-us-mi at lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-us-mi/attachments/20110920/dc1dcafd/attachment.html>
More information about the ubuntu-us-mi
mailing list