2

I'm using Ubuntu 10.10, Apache 2.2.17 and Mysql 5.5.10.

I need some assistance getting Apache and Mysql running on boot.

Reading the getting started over at upstart website attempting to get it to work.

I added /etc/init/apache2.conf

along with the following line:

exec /usr/local/apache2/bin/apachectl

I'm probably doing everything wrong, could someone point me in the right direction? Thanks. :)

2 Answers 2

1

upstart's method of following forks isn't really suited to apache unfortunately (there's a new method in development, expect exit which will handle this). So for now the init.d script is probably fine.

If you really need to have apache start before/after some other upstart job.. you can do

start on started otherjob
stop on stopping otherjob

pre-start exec /usr/local/bin/apachectl start

post-stop exec /usr/local/bin/apachectl stop

For mysql, I'd recommend installing the mysql package and using its upstart job, just change the paths to use your installed binaries.

4
  • Where can I find mysql's upstart job?
    – Tek
    Dec 6, 2011 at 8:21
  • /etc/init/mysql.conf the source is in the packaging branch at code.launchpad.net/ubuntu/+source/mysql-5.5
    – SpamapS
    Dec 7, 2011 at 23:39
  • @SpamapS isnt that the Precise development version?
    – Thomas Ward
    Dec 8, 2011 at 1:14
  • Yes, I would assume if you are going to run MySQL "not from the repo" that you want 5.5... it should work fine going back to lucid.
    – SpamapS
    Dec 8, 2011 at 6:15
0

for running apache in boot:

update-rc.d -f apache remove 

and

update-rc.d apache2 start 88 2 3 . stop 0 1 6 .

And for mysqld too.

1
  • This is great and all. But I really wanted to learn how to use Upstart.
    – Tek
    Apr 9, 2011 at 4:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .