โ๐๐ง๐ญ๐๐ ๐ซ๐๐ญ๐ข๐จ๐ง ๐จ๐ ๐๐ฆ๐๐ณ๐จ๐ง ๐๐๐ ๐ฐ๐ข๐ญ๐ก ๐๐ฎ๐ฅ๐ญ๐ข-๐๐ข๐๐ซ ๐๐ฉ๐ฉ๐ฅ๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ซ๐๐๐ซ๐๐ฌ๐ฌ
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.
- 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
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
In step 3 we need to copy the php code In wp-config-php file then proceed
towards wordpress installation โฆ
Here we can see that our Wordpress has been install successfully โฆ
Now In step 5 we are going to login into worpdress to make our website โฆ
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 !!