How to Install LAMP Server on Ubuntu.

Within Ubuntu use the hotkey Ctrl+Alt+T to open a terminal window. Than, copy and paste the lines below individually into the prompt. The video will show you what configuration windows open up and what answers to provide. If you want to use this guide without the video tutorial, a general rule of thumb is simply to hit “next” or “yes” when prompted.

APACHE

$ sudo apt-get install apache2

MYSQL / PHPMYADMIN

$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin

PHPMYADMIN

$ sudo apt-get install phpmyadmin
$ sudo gedit /etc/apache2/apache2.conf
$ Include /etc/phpmyadmin/apache.conf
$ sudo /etc/init.d/apache2 restart

PHP

$ sudo apt-get install php5 libapache2-mod-php5
$ sudo gedit /var/www/testphp.php

<?php

phpinfo();

?>

Open a browser and go to: http://localhost/testphp.php
RESTART APACHE

$ sudo /etc/init.d/apache2 restart