Install LAMP Stack on Ubuntu
The LAMP (Linux, Apache, MySQL, PHP/Programming language) stack is a commonly used group of software for web servers.
If you're in a hurry, this command should do the trick on Ubuntu 14.04:
$ sudo apt-get update && sudo apt-get -y install apache2 mysql-server libapache2-mod-auth-mysql php5-mysql php5 libapache2-mod-php5 php5-mcrypt
During the installation process, you will be asked to set a MySQL root password. Enter it twice, and the installation will complete shortly.
It is also recommended to run
mysql_secure_installation after the initial install.