Debian based Linuxes: How To Install L A M P?

Root

Sudo su

Update/Upgrade Package

apt update
apt upgrade

Install Apache

apt install apache2

To check if Apache is running, you can go to your web browser and type http://localhost You should see the Apache2 Default Page.

Install Maria DB

apt install mysql-server

Install PHP

apt install php libapache2-mod-php php-mysql

Test PHP Processing: Create a PHP file to test the PHP processing.

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

Then, go to http://localhost/info.php in your web browser. You should see a page showing the PHP configuration details.

Restart apache

systemctl restart apache2