Complete script to install Apache, PHP and MariaDb (MySQL) on Ubuntu based linux distros. This script will also set the correct folder and mysql permissions, and install basic php extensions.
To use, simply download the install-lamp.sh file and run:
sudo chmod a+rx install-lamp.sh
to make it executable.
Then just run:
./install-lamp.sh
as your user (not as root or sudo)