Popular enterprises applications run on the LAMP stack; Linux, Apache, MySQL/MariaDB, and PHP. WordPress, Drupal, Moodle, and similar application software run on LAMP. Installation of a LAMP stack on Linux-based operating systems like Debian/Ubuntu is comparatively easier than before.
Install the latest stable version of Debian/Ubuntu first. I prefer to use lightweight Ubuntu flavour Xubuntu for this purpose. Here are the steps and commands to install LAMP infrastructure.
Update the Debian/Ubuntu
sudo apt update
sudo apt upgrade