Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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 W. 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

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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