AWS TASK:-
Task Description📄
Create an AWS EC2 instance
Configure the instance with Apache Webserver.
Download PHP application name "WordPress".
As WordPress stores data at the backend in MySQL Database Server. Therefore, you need to set up a MySQL server using AWS RDS service using Free Tier.
Provide the endpoint/connection string to the WordPress application to make it work.
Let's Start:-
Creating Security Groups for Instance and Database:-
Instance SG
Database SG
Here in the Inbound Rules , we have given Security Group of the instance so that only instance can connect with Database.
Creating an EC-2 Instance:-
Creating Database:-
Here we give the Security Group created earlier.
Configuring Instance:-
Installing HTTPD and starting it's services:-
yum install httpd -y
systemctl start httpd
systemctl enable httpd
Installing PHP:-
amazon-linux-extras install php7.2
Installing and configuring MYSQL:-
yum install mysql
Downloading Wordpress:-
wget https://wordpress.org/wordpress-5.4.4.tar.gz
To extract the files use:-
tar -xzvf wordpress-5.4.4.tar.gz
Now move the Wordpress files to the /var/www/html/ directory:-
mv wordpress/* /var/www/html
Now change the ownership of the files to root :-
chown root:root -R /var/www/html/*
Now restart the httpd service using:-
systemctl restart httpd
So here our Wordpress started.