Problem scenario
You want to deploy the LAMP stack on a Debian/Ubuntu distribution of Linux. You want to install and the four core technologies that compose the LAMP stack (Linux, Apache web server, MariaDB/MySQL, and PHP). How do you do this?
Solution #1 (with MySQL)
To install the OS, Ubuntu Linux, see this link. To install MySQL run these commands:
sudo apt-get -y update
sudo apt-get -y install php apache2 mysql-server
# Provide a password for the mysql root user when prompted.
# To log into the mysql database for the first time, use this command:
# mysql -u root -p # You will be prompted to enter a password.
Solution #2 (with MariaDB)
If you wanted to use MariaDB and assuming Ubuntu is already installed, run these commands:sudo apt-get -y update
sudo apt-get -y install php apache2 mariadb-server