A
A
Avant2010-11-20 09:24:41
MySQL
Avant, 2010-11-20 09:24:41

apache2, mysql and autostart (Ubuntu 10.04)

Ubuntu 10.04
LAMP was also installed on ubuntu 9.10, but when Apache was updated to 10.04, the muscle disappeared from autorun. For some time I did not pay attention and started them with the command:
sudo /etc/init.d/apache2 start
well, mysql, respectively.
Today I decided to play around with them and somehow return autorun, googled it, but it didn’t work out, it’s not clear about upstart at all.
Then I decided to remove LAMP completely and deleted these apache2 and mysql scripts in /etc/init.d along with them , it is not clear why I did this ... I put it again on this forum.ubuntu.ru/index.php?topic=25668.0LAMP, but again nothing was registered in autorun, and without those scripts that were in /etc/init.d, now I can’t even start Apache (What should I do? How to return these scripts and register Apache with muscle in autorun. I hope you You will not advise me to stick the whole thing into the "Startup Applications" :)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
shsmad, 2010-11-20
@shsmad

sudo aptitude purge apache2
sudo aptitude install apache2
will give you rc.d scripts and an init.d script. probably removed via remove, not purge

G
globotron, 2010-11-20
@globotron

1. You have Ubuntu, why do you need LAMP?
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 mysql-server
and everything will register itself, will work and be updated along with OS
2. If LAMP with self-written scripts is important to you, you can add autorun scripts to /etc/init .d
In the same folder copy "sudo cp skeleton apache2", edit apache2 to start and stop apache. Same for mysql. Then "update-rc.d apache2 defaults" to start the service on boot. But this path is not for you.

V
Vlad Zhivotnev, 2010-11-20
@inkvizitor68sl

man update-rc.d

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question