14

I setup a LAMP server on my desktop Ubuntu install for testing web applications. How do I set it to only run when I tell it to rather than at startup? It is not used as a production web server but instead for testing PHP scripts I write before pushing them to my public web server.

AJ00200
  • 410

4 Answers4

17

Remove from start up:

sudo update-rc.d apache2 remove
sudo update-rc.d mysql remove

Start at will:

sudo service mysql start
sudo service apache2 start
Marco Ceppi
  • 48,101
wojox
  • 11,362
13

This will start Apache, MySql and ProFTPD.

Just write this in terminal:

sudo /opt/lampp/lampp start
Eliah Kagan
  • 117,780
0

To start the server:

sudo /opt/lampp/lampp start

To restart the server:

sudo /opt/lampp/lampp restart

To stop the server:

sudo /opt/lampp/lampp stop
Eliah Kagan
  • 117,780
  • Hi there. The user asked for how to change the configuration to disable the application running on startup. You've provided an answer to a different question. You can see the correct answer to this question already posted, using update-rc.d. – Jeremy Jul 11 '20 at 07:04
  • @Jeremy That was my first thought, too, but now I'm not so sure. It seems this question has been interpreted to encompass how to manually start the server, considering how that other answer currently has nine upvotes and zero downvotes. This answer might be regarded as covering the same ground as that... but it also says how to restart and stop the server. – Eliah Kagan Jul 11 '20 at 07:21
0

If that doesn't work, try removing them forcefully.

sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
Alaa Ali
  • 31,535