Have you ever thought just 3 commands can install a complete basic LAMP stack for you on Ubuntu server.
Here we go, the best and easiest way to install LAMP stack
$ sudo apt-get update
$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server
Note: Give Mysql root password whenever it prompts.