I have a VPS server instance, and I wanted to install the LAMP stack onto it. It was, of course, already running Ubuntu 20.04, but everything else was missing.
The steps were as follows:
Refresh packages:
sudo apt-get update
Install MySQL:
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
Install Apache:
sudo apt-get install apache2 apache2-doc apache2-utils libexpat1 ssl-cert
Install PHP:
sudo apt-get install libapache2-mod-php7.4 php7.4 php7.4-common php7.4-mysql phpmyadmin
(I had to reinstall and reconfigure phpMyAdmin after the first install. That was done with the command sudo dpkg-reconfigure phpmyadmin
.)
In the end I was able to load the default Apache start page and login to phpMyAdmin.
Sources:
betterprogramming.pub
askubuntu.com