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. :)

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.

  • Where can I find mysql's upstart job? – Tek Dec 6 '11 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 '11 at 23:39
  • @SpamapS isnt that the Precise development version? – Thomas Ward Dec 8 '11 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 '11 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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.