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
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
This will start Apache, MySql and ProFTPD.
Just write this in terminal:
sudo /opt/lampp/lampp start
-
@DavidFoerster C'mon man i just made a silly spelling mistake! :p May 12, 2017 at 16:59
If that doesn't work, try removing them forcefully.
sudo update-rc.d -f apache2 remove
sudo update-rc.d -f mysql remove
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
-
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
.– JeremyJul 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