titusnangitech / LEMP-web-stack-implementation-project

Deployed a LEMP (Linux, Nginx, MySQL, PHP) stack website on AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deployed a LEMP (Linux, Nginx, MySQL, PHP) stack website on AWS

STEP 01 - Created and connected to an EC2 instance in the us-east-1 region

ec2 pic

  • Selected the us-east-1 region and launched a new EC2 instance of t2.nano family with Ubuntu Server 20.04 LTS (HVM) launch EC2

creating an ec2 instance with t2 nano

  • Created a key pair

creating a key pair

  • Created a security group

created a security group

  • Used the existing security group

used the existing sg that we have created

  • Ec2 instance launched successfully

ec2 launched succesfully

STEP 02 – Installed the Nginx webserver

  • populated Mobaxterm with ec2 public IP address, username and key pair details to connect to the EC2 instance

populating the mobaxterm with details

  • connected successfully into the EC2 instance using Mobaxterm

connected to the ec2 instance

  • Switch from ubuntu user to root user
sudo -i

switching to root user

  • start off by updating my server’s package index. Following that, I can use apt install to get Nginx installed:
apt update
apt install nginx

apt update

install nginx

  • Verify that Nginx is running

verify that nginx is running

  • checking if we can connecting to our server from localhost

checking if we can connecting to our server from localhost

localhost connection successful

  • Now it is time for us to test how our Nginx server can respond to requests from the Internet. Open a web browser of your choice and try to access following url. If you see following page, then your web server is now correctly installed and accessible through your firewall.

connecting from the intenet

STEP 03 — Installing MySQL

Now that i have a web server up and running, I installed a Database Management System (DBMS) to be able to store and manage data for my site in a relational database. MySQL is a popular relational database management system used within PHP environments, I used it in our project.

apt install mysql-server

When the installation is finished, log in to the MySQL console by typing:

mysql

To finish

STEP 04 - Installing PHP

To finish

About

Deployed a LEMP (Linux, Nginx, MySQL, PHP) stack website on AWS