Web Server Setup (Nginx, PHP7.2, MariaDB) on Ubuntu 18.04

sudo apt update   
sudo apt install nginx -y

In Ubuntu 18.04 currently PHP 7.2 is installing by default.

sudo apt install php-fpm php-mysql

Check when it’s asking [Y/n] is it PHP 7.2 or not. Be sure it’s the version which you want to install.

Below commands is for installing PHP modules (which I’m setting up most of the times). It’s also tries to install for PHP 7.2 by default.

apt install php-mbstring
apt install php-curl
apt install php-xml
sudo apt install mariadb-server -y

Detailed MariaDB Server Setup

· nginx, mariadb, php, ubuntu, mysql