โšœ๐ˆ๐ง๐ญ๐ž๐ ๐ซ๐š๐ญ๐ข๐จ๐ง ๐จ๐Ÿ ๐€๐ฆ๐š๐ณ๐จ๐ง ๐‘๐ƒ๐’ ๐ฐ๐ข๐ญ๐ก ๐Œ๐ฎ๐ฅ๐ญ๐ข-๐“๐ข๐ž๐ซ ๐€๐ฉ๐ฉ๐ฅ๐ข๐œ๐š๐ญ๐ข๐จ๐ง ๐–๐จ๐ซ๐๐๐ซ๐ž๐ฌ๐ฌ

Harshal Thakare
6 min readJan 23, 2021

Welcome back to my another article๐Ÿ˜Š

In this article, we will be demonstrating the below 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 setup a MySQL server using AWS RDS service using Free Tier.

๐Ÿ”… Provide the endpoint/connection string to the WordPress application to make it work.

So Letโ€™s Commence โ€ฆ..

Before moving ahead, letโ€™s know some basic introduction

Amazon Relational Database Service (RDS)

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need.

Amazon RDS is available on several database instance types โ€” optimized for memory, performance or I/O โ€” and provides you with six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server. You can use the AWS Database Migration Service to easily migrate or replicate your existing databases to Amazon RDS.

WordPress

Wordpress is the worldโ€™s most popular tool for blogging and managing website. It is based on PHP and MySQL and is used by major top websites in the world. Hundred of themes and thousand of plugins that are available, provides immense customization features to this CMS.

MySQL

MySQL Database Service with HeatWave

MySQL is an open source, relational database management system (RDBMS) based on structured query language (SQL). MySQL is available on all major operating systems, including Windows, Linux and Solaris. It is free to use for individuals and non-production environments under the GNU General Public License; however, if used commercially, a commercial licence is required.

MySQL, like other relational databases, stores data in tables, columns and rows. Each entry is defined by a unique identifier. Its raison dโ€™รชtre has always been the performance and reliability of the database. MySQL was designed and optimized for the web development arena; it is arguably the most common database used in web server deployments. MySQL works very well with Apache and PHP and is often the go to database for LAMP stack deployments. MySQL powers 9 out of 10 websites on the internet today, and is the database chosen by Facebook, Twitter and Wikipedia.

So Letโ€™s start our todays task

First of all we need EC2 instance so I used the Amazon Linux 2 AMI for Creating an AWS EC2 instance.

Then Install & Configure the instance mysql database and apache webserver.

  1. Install mysql

Install mysql using command below :

yum install mysql -y

2. Install Apache WebServer (httpd)

Install Apache Webserver(httpd) using command below:

yum install httpd -y

3. Install PHP

Install PHP by using command below:

amazon-linux-extras install php7.2 -y

After installing successfully. you need to Install WordPress using the command below.

4. Install WordPress

wget https://wordpress.org/latest.tar.gz

After Installing WordPress we need to Extract WordPress

5. Extract WordPress

tar -xzf latest.tar.gz

After Extracting Move the WordPress folder to root directory /var/www/html

6. Moving WordPress Floder

Moving WordPress folder to root directory /var/www/html using command

mv wordpress /var/www/html

After moving the WordPress folder to Root directory we need to edit the configuration file of httpd

7. Edit the httpd Configuration file

We need to changed the AllowOverride None to AllowOverride all in this file

vim /etc/httpd/conf/httpd.conf

Now Itโ€™s time to start the Apache WebServer (httpd Service)

8. Start httpd Service

For Storing the data WordPress used the MySQL Database Server. So we need to Configure the Database Using the Amazon RDS Service.

9. Create Database(MySQL)

For Creating the Databasein free tier follow the Below Steps carefully

Step 1
Step 2
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10

Database Created Successfully โ€ฆโ€ฆ.!

Then we need to create MySQL Databse

10. Create MySQL Database

create MySQL Database

Here we can see database mydb1 is empty

Now On Browser give the public IP of Ec2-Instance

11. Browser Now

http://<public ip of ec2-instance>/wordpress
Setp 1
Step 2
Step 3

In step 3 we need to copy the php code In wp-config-php file then proceed

towards wordpress installation โ€ฆ

Step 4

Here we can see that our Wordpress has been install successfully โ€ฆ

Step 5

Now In step 5 we are going to login into worpdress to make our website โ€ฆ

Step 6

Here we get the option to customize our site ,So we can create our own customize website .After that we need to check our database

12. Check Database (mydb1)

Here we can see that we get tables in our Database mydb1.

Here Our Task is Successfully Completed !!!๐Ÿ˜ƒ๐Ÿ™Œ๐Ÿป

Thanks For Reading !!

๐Ÿ”ฐKeep Learningโ—โ—๐Ÿ”ฐKeep Sharingโ—โ—

--

--