LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.
This tutorial was has been tested on Debian 7 & Ubuntu 10.04, 10.10, 11.04, 11.10, 12.04 LTS Precise Pangolin. Also tested in LinuxMint13 and works fine.
Open terminal and Type the command :install it first with
sudo apt-get install tasksel
Now to install LAMP, type the taskel command in terminal :
And select LAMP Server:
sudo gedit /var/www/info.php
<?php phpinfo(); ?>
save and exit
restart apache2 ,
sudo /etc/init.d/apache2 restart
Now open browser and type :
http://ip/info.php or http://localhost/info.php