tasksel lampserver
Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. It’s similar to meta-packages where tasks are dericed from from Ubuntu package managers like Synaptic or KPackageKit.
Here’s a quickway to install a lamp server.
# install tasksel first if you don't have it.
apt install tasksel
# install a lamp server package
tasksel install lamp-server