Install Nginx, MariaDB, PHP, Certbot on Amazon 2 (Ec2 instance)

Dimitris Moutsatsos
3 min readNov 18, 2020

This is a very simple installation with no custom setup.

Prerequisites

Before start this tutorial you should know how to create , use and connect to an amazon ec2 instance.

Step1 : Nginx

Install and run nginx

$ sudo amazon-linux-extras install nginx1 -y
$ sudo systemctl start nginx.service

Now navigate to a browser and open http://[YOUR_INSTANCE_IP] to check that everything works as expected and you will see the following:

Step2 : MariaDB

Install and run Mariadb

$ sudo yum install mariadb-server -y
$ sudo systemctl start mariadb.service

Now we have completed the installation of MariaDB , setup the root credentials.

$ sudo  mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the…

--

--

Dimitris Moutsatsos

developer and weirdo / current: FinTech Insights / Tychetech / Resitech