Use an Ubuntu Server install and select the LAMP (linux, Apache, Mariadb, PHP)
option during install to install Apache, MySQL and PHP. If you failed to do
this you can achieve the same result by running:
sudo apt-get install tasksel
sudo tasksel install lamp-server