Note: All the commands will need to be run as root.
First, install MySQL. During the installation, you will be asked for a MySQL administrator password.
apt-get install mysql-server mysql-clientNext, install Apache, which is simple. You can install it by typing the following command:
apt-get install apache2Now if you open a web browser and put localhost as the URL, you should see an Apache placeholder page.
To install PHP and the PHP Apache module, use this command:
apt-get install php5 libapache2-mod-php5Now restart Apache so that the changes will take effect.
/etc/init.d/apache2 restartYou now have a LAMP server, but there are some other packages that you may want to install. There are a bunch of PHP modules that you might want for your applications. You can find a list by searching apt:
apt-cache search php5After you install modules, restart Apache again. To install the phpMyAdmin interface, use:
apt-get install phpmyadminThat's it!