In this guide I will show you the easiest way, how to install a LAMP server. LAMP stands for Linux, Apache, MySQL, PHP. There are many methods to install LAMP, for example the standart one see this howto for ubuntu: Howto: Install LAMP and phpMyAdmin on Ubuntu
Method One (using Terminal)
Under Terminal type command:
Select LAMP server and hit OK
If prompted, insert new root password for the MySQL
Method Two (using Terminal)
sudo tasksel install lamp-server
Method Three (using Terminal)
sudo apt-get install php5 apache2 mysql-server
Method Four (using Synaptic Package Manager)
Run System > Administration > Synaptic Package Manager and select Edit > Mark Packages by Task…
Select LAMP server
In the next step you can see packages, that would be installed
Enter new password for the MySQL root user
and that’s it..
Open a web browser and enter the address http://localhost. You should see a webpage displaying the text "It Works!"
To test our PHP installation we need to create file called info.php in /var/www. Open Terminal and enter:
sudo gedit /var/www/info.php
Enter the line below, save the file, and exit the text editor.
sudo /etc/init.d/apache2 restart
Now, open your browser and enter http://localhost/info.php. You should see a bunch of information about your version of PHP.
This step is optional. To easy access MySQL databases use phpMyAdmin.
Under Terminal enter this command to install phpMyAdmin
sudo apt-get install phpmyadmin
If prompted, use the spacebar to mark apache2 and then hit Enter.
You will also be asked if you want to configure phpMyAdmin with a new database called dbconfig-common. Select Yes and press Enter.
Next you’ll be prompted for the password for MySQL’s administrator. Enter the MySQL root password that you created earlier in the installation. Select Yes and press Enter.
Next you’ll be prompted to create an application password for phpMyAdmin to talk to MySQL. If you leave it blank, a random password will be generated for you.
After configuring the password, the installation should complete.
Testing MySQL (phpMyAdmin)
Open a web browser and enter the address http://localhost/phpmyadmin.You should see this page:
Login using the username root and the root password, that you created earlier.
The LAMP server is successfully installed.