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.

4 Answers 4

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
1
  • in 11.10 I've used sudo update-rc.d apache2 disable :)
    – Pitto
    Jan 7, 2012 at 20:38
13

This will start Apache, MySql and ProFTPD.

Just write this in terminal:

sudo /opt/lampp/lampp start
1
  • @DavidFoerster C'mon man i just made a silly spelling mistake! :p May 12, 2017 at 16:59
0

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

sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
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
2
  • 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, 2020 at 7: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. Jul 11, 2020 at 7:21

You must log in to answer this question.

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