How to install LAMP
v1.1 r18dec2013 fr21jan2006
by Elf Qrin

LAMP stands for Linux, Apache, MySQL, PHP.
You can have a fully working and already configured LAMP system on a Debian Linux installing the following modules:
apt-get install apache2
apt-get install lynx
apt-get install openssl
apt-get install php5 libapache2-mod-php5 php5-sqlite php-pear php5-gd php5-mcrypt # PHP 5
apt-get install php5-mysql # MySQL support for PHP 5
apt-get install mysql-server
apt-get install phpmyadmin

To edit configuration files, you can install JED, and editor which is more user friendly than VI:
apt-get install jed
Use this command to see which version of Apache 2 you have installed:
usr/sbin/apache2 -v
You can customize Apache 2 settings editing these files:
jed /etc/apache2/apache2.conf
jed /etc/apache2/sites-available/default

Don't forget to restart Apache after reconfiguring it:
/etc/init.d/apache2 restart
You can install phpMyAdmin to handle MySQL databases easily:
apt-get install phpmyadmin
and Webalizer to have updated stats of your website:
apt-get install webalizer
Configuration files for Webalizer can be found here:

See also How to install WAMP(P)(P) (for Microsoft Windows)