How to install LAMP on Ubuntu 18.04

One of the most popular server side stack on the web today is LAMP. This powerful combination of Apache Web server, MySQL database and PHP running on top of Linux has proven itself. Today’s article is about setting up LAMP on Ubuntu 18.04. A simple task that takes less than five minutes to get a fully working web server.

Installation on Ubuntu is a simple one liner:

apt install apache2 mysql-server php

Current versions installed are Apache 2.4, MySQL 5.7 and PHP 7.2.

Keep in mind that this setup is quick and easy but you certainly need to change some configuration before going in production with your new web server.