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



LAMP stands for Linux, Apache, MySQL, PHP.
You can have a fully working and already (almost) configured LAMP system on Debian Linux installing the following modules:
apt-get install apache2
apt-get install lynx
apt-get install openssl
apt-get install php7.0 libapache2-mod-php7.0 php-pear php7.0-gd php7.0-mcrypt php7.0-sqlite3 # PHP 7
apt-get install php7.0-mysql # MySQL support for PHP 7
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:
/etc/webalizer.conf
/var/log/apache2/access.log




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