In this tutorial we’ll install the Debian Linux 9 (squeeze), Apache 2 with mpm-itk (to run each web as a isolated user),...
How to install LAMP (Apache, PHP and MySql in Linux)Ástþór IP
Here’s a basic guide on how to get Apache2, PHP5 and MySql working on most Debian based distros in a few easy steps.
1. Install Apache2 and PHP5 (as an Apache module)
apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
2. Install MySql server
apt-get install mysql-server
3. At this point you may need to restart Apache
3. Create a test php file
echo "<?php phpinfo(); ?>" > /var/www/info.php
The default document root for Debian is in /var/www so you can access the test file on this location: http://yourserver/info.php
3. Install phpMyAdmin (optional but preferred by most developers and administrators)
apt-get install phpmyadmin
By default, phpmyadmin will be accessible on: http://yourserver/phpmyadmin