I was trying to install a LAMP server locally and after some guides and questions I managed to get it up and running smoothly. How hard is it? Well, it is not that hard, thanks to Tasksel (Note: this will only work from Ubuntu 7.04 Feisty Fawn and above):

sudo tasksel install lamp-server

Troubleshooting

The following are some frequently encountered problems when checking the installation of your PHP stack in Ubuntu:

  • The browser shows you a popup asking you to open the file, as if the PHP engine is not recognized.

There’s a problem with your php5-common package. Replace it with php5 and phpmyadmin. To replace php5-common, run the following two commands:

apt-get --purge remove php5-common


apt-get install php5 phpmyadmin

More help?

What is LAMP?

From Wikipedia:

LAMP is an acronym for a solution stack of free, open source software, originally coined from the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software), and PHP, Python or Perl (scripting language), principal components to build a viable general purpose web server.