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.
Asked
Active
Viewed 8.4k times
4 Answers
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
- 47,783
- 30
- 172
- 197
wojox
- 11,152
- 5
- 40
- 60
-
in 11.10 I've used sudo update-rc.d apache2 disable :) – Pitto Jan 07 '12 at 20:38
13
This will start Apache, MySql and ProFTPD.
Just write this in terminal:
sudo /opt/lampp/lampp start
Eliah Kagan
- 116,445
- 54
- 318
- 493
Md Sifatul Islam
- 231
- 2
- 6
-
@DavidFoerster C'mon man i just made a silly spelling mistake! :p – Md Sifatul Islam May 12 '17 at 16:59
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
- 116,445
- 54
- 318
- 493
-
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](https://askubuntu.com/a/914527/22949) 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,075
- 11
- 94
- 105