Manual Deployment of Web App and API into LINUX Server
Create an EC2 Instance from AWS Console.
o Select the AMI.
o Select Instance Type.
o Create new keypair.
o Select Security Groups and VPC and Subnets.
o Add the Volume.
o Create the instance.
o Create Elastic IP address and Associate it to created Instance.
Connect Created instance in MobaXterm tool using Public IP address
and keypair (You can connect though putty also) specifying ec2-user.
Install Apache web server and start webserver.
o “sudo yum install httpd” – To install Apache Web Server.
o “sudo systemctl enable httpd” – To enable Apache web server.
o “sudo systemctl start httpd.service” – To Start Apache.
o “sudo systemctl status httpd.service” – To check the status of
Apache web server.
Install MariaDB (MySql Distribution)
o “sudo yum install mariadb105-server” To install mariadb.
o “sudo systemctl start mariadb” – To start mariadb.
o “sudo systemctl enable mariadb” – To enable mariadb.
o “sudo systemctl status mariadb” – To check the status of
mariadb
o “sudo mysql --version” – To check the version.
Secure Mysql Installation
o “sudo mysql_secure_installation -p” – Give your new root user
password. For all other prompts give and yes and continue.
Clone Repository
o “sudo yum install git” – To install the git
o Create api directory in /var/www/html by using “sudo mkdir api”
o “git clone (url)” – To clone the repository.
o “sudo chmod 777 api/” – Allow Read, write and execute
permission.
Install SSL Certificate for Amazon LINUX AMI 2023
o Install Certbot by following commands
o sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip
sudo /opt/certbot/bin/pip install certbot certbot-apache
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot