Install LAMP in Ubuntu 18.04

Install LAMP Ubuntu 18.04

Using the tasksel command the procedure of installing LAMP on Ubuntu 18.04 Bionic Beaver is a rather trivial matter. First, make sure that you have the tasksel package installed:

$ sudo apt install tasksel

To install LAMP server using tasksel execute:

$ sudo tasksel install lamp-server

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

MySQL Secure Installation

It is recommended to secure your MySQL installation before using your LAMP stack server in production. To do so execute:

$ mysql_secure_installation

Firewall Configuration

The following firewall configuration allows incoming traffic on TCP ports 80 and 443:

$ sudo ufw allow in "Apache Full"