In your terminal, you will run the following commands:
sudo apt-get install apache2 sudo apt-get install php5 sudo /etc/init.d/apache2 restart
Note that if apache is already installed you can omit the first line. Your web files will now be found in /var/www/
After restarting your apache, we will see this line:
This is the default web page for this server.
In case we dont have permission to write the www/ folder, we need to change its permission.
sudo chown -R yourusernamehere /var/www/
After you install the PHP and Apache. Now its time to install the mysql.
Click here on how to install mysql on ubuntu.