Task 3- AWS CSA

Peeyush Yadav
4 min readAug 25, 2021

Task Description:

  1. Create an AWS EC2 instance
  2. Configure the instance with Apache webserver
  3. Download PHP application name “WordPress”
  4. WordPress stores data at the back-end in the MySQL Database Server. Therefore, you need to set up a MySQL server using AWS RDS service Free Tier.
  5. Provide the endpoint/connection string to the WordPress application to make it work.

Requirements for the task:

  • An AWS active Account
  • Basics on Linux commands
  • Basics on DBMS and MySQL

Steps to be followed: Creation of the MySQL RDS

  • In the Database service, select RDS
  • Click on Create Database
  • Select MySQL
  • Select the latest version of MySQL and free tier to be safe from any future charges and are within the charging limit.
  • Name your database and set your username and password for your database.
  • You can leave the rest, set to default. For the Public access select, mark it as “YES” otherwise you won’t be able to connect to WordPress through RDS. Choose your security group if you have already have created one, leave it to default (although, changes may be required for the default case as the Protocols may not be given access).
  • Now click on create the database.

Step 2: Launch an EC2 instance and configure WordPress on it.

  • Select an instance and click on connect to connect and access your VM instance.
  • run sudo -su root to become the user with root privileges and is able to run such privileged commands.
  • To set up WordPress, first, we require some software to be installed in our instance.
  • Type in yum install httpd -y and yum install mysql -y , to install these services over your instance.
  • Run amazon-linux-extras enable php7.4 command to install and enable PHP services over the EC2 instance.
  • Head over to the official site of WordPress (https://wordpress.org/download/) and copy the download link for future use.
  • In your EC2 instance change the directory to the mentioned directory by typing; cd /var/www/html/
  • Now, run tar -xf latest.tar.gz to unzip the WordPress software.
  • Enable the httpd service, and enter your public Ip of EC2 instance on the browser, followed by your WordPress folder:

Step 3: Check your RDS MySQL database connectivity.

  • Copy your database endpoint
  • Run mysql -h <your MySQL endpoint address> -u <Username> -p. Enter the password that you set during the initiation of the MySQL database.

This is it! You have connected to the database and now use the same by entering any MySQL commands and manage the DB at the same time.

Hope you had a great read. Thanks.

I duly thank Mr. Vimal Daga and his team for their guidance and team throughout this process of learning.

Looking forward to learning even further and share opportunities for the same.

Adios.

#awscloud #awscli #aws #vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeudcation #awsbylw

--

--