How to setup a wordpress website on AWS EC2 within few minutes

Image
"Learn, Learn and Learn"

Here we are going to discuss how can we setup our own WordPress website in our amazon EC2 within few minutes. There are several platforms which gives you the option to pay for their services and have a WordPress site. Then you can build whatever you need to do. But today we will discuss how to build our own server, install WordPress and setup the rest.

What is the benefits of choosing AWS to setup WordPress ?

Because you don't need to pay for services which other platforms provides. In AWS, you are the owner of your server and you are the person who install and setup your installation. So no monthly charges for anonymous companies . Only pay is for as you go. From this article we will learn how to setup our own WordPress site. In AWS also there are options to use pre-installed WordPress and make our site.  But here we will discuss how to do it without using pre-installations.

Follow the steps as below. 

1) First we need to create a AWS EC2 instance.…

How to extend your AWS EBS volume without any DOWNTIME

Have a successful day!...

What is AWS EBS ( Elastic Block Storage ) ?

AWS EBS is a service which gives you storage for your EC2 instances. Its like a persistent hard disk in the cloud which could be attached to your EC2 instances and create your file system on top of the EBS volumes. Not like in S3 ( Simple storage service ) we can install any type of files in here, any operating system.

Can be these storage volumes extended on your need ?

Yes. You can do it without having any DOWNTIME in your server. Since AWS EBS stands for elastic block storage. This can be extended or shrink at any time without any affect for your server.

From this article we will test how can we extend our storage volume without any server downtime.

THIS CAN BE DONE IN PRODUCTION LEVEL...

We are using a Ubuntu machine for this example.


We can see currently we have the EBS volume with 8GB storage.


within the Linux server



To extend the volume, follow the below steps.

1) Go to Volumes under EC2 service.

2) Click on Modify volume.


3) Change the size of 8G to 16G and press modify button. You will get a window before modifying, click yes.




4) Go to your linux server with a putty session and type below commands


output of lsblk command shows us the total size of the disk has extended to 16G. But the new space is not added to the partition yet. Thats why /dev/xvda1 partition still shows as 8G. So we will add the newly added 8G to our partition.



With growpart command, we can change the partition size in order to grow the size.

Syntax :

growpart <disk name> <partition number>

in here, the disk name is /dev/xvda and the partition we need to modify is the first partition. So we have to give number 1. If there were two partitions and we needed to change the second partition then the command would be growpart /dev/xvda 2. 

Finally we can see new space has added to the parition.



5) resize the partition to affect for the mount point. First check your partition file system type.


If it is an ext file system, use resize2fs and if its an xfs file system, use xfs_growfs commands.




Its successfully done without any downtime.

Cheers.

Comments

Popular posts from this blog

Why i can't ping to my AWS EC2 Instances ?

Different types of users in linux

NFS Server and Client Installation with Configurations.