To install the default LAMP stack in Ubuntu 10.04 and above
First install tasksel...
sudo apt-get install tasksel
... and then the LAMP stack:
sudo tasksel install lamp-server
DO NOT UNCHECK ANY PACKAGES IN THE MENU WHICH APPEARS
seek more information about LAMP(Linux+Apache+MySQL+PHP)
See the link below: