Amazon Web Services, A cloud service provider that does not require any introduction. Many large companies depend on AWS for Infrastructure. They provide a lot of different cloud services like E-mail Service, Compute services, Storage services and much more.
However, One of the most popular products of AWS is EC2 Instances. EC2 instances are basically virtual machines that you can upgrade or downgrade according to your requirements. In other words, EC2 instances are resource-flexible Virtual Private Servers.
You can also use these instances to host your PHP/WordPress sites. And if you are a ServerAvatar customer, you can also connect your EC2 instances with ServerAvatar to manage your PHP/WordPress applications in your instances.
In this tutorial, I am going to show you How to create and connect an AWS EC2 instance with ServerAvatar. First, I am going to show you How to create one. If you already know How to create an EC2 instance in AWS, You can skip the first part of this guide.
First of all, Log in to your Amazon Web Services account. Once you are in, click on the EC2 option wherever you see it. In the following screenshot, I have highlighted two such links.
The link will redirect you to the EC2 instance dashboard where you can manage your EC2 instances. The dashboard should look like the following image.
At the bottom, you should find the Launch Instance button just like the following image.
The Launch Instance button will lead you to an EC2 instance creation wizard. In the first step, you have to select the Image (Operating system) you want to run on your EC2 instance.
ServerAvatar currently supports the following Operating Systems.
Write down "ubuntu" in the search bar and hit enter to find the relevant operating systems and select the one that is supported just like the following image.
In the second step, you have to select the size of your instance. You can select the size as per your traffic and resource requirements. In this case, I am selecting the t2.micro instance.
This instance is also available if you are in a Free tier.
In the 3rd step, you can set up Networking and number of instances you want to create.
In the 4th step, you can specify the storage space you want on the server. You can also select the type of the disk you want on your EC2 instance.
In the 5th step, You can assign tags to your instance.
Jump to the 6th step. It is because in the 6th step, we have to add a firewall rule that will allow ServerAvatar to manage your server.
Once you are on the 6th step, Add Rule with the following settings.
Once the rule is created, your screen should look like the following image.
Finally, click on the Review and Launch button to review your instance. Make sure everything is perfect. Click on the Launch button given at the bottom-right corner of the screen to see a pop-up in which you have to select or create a key pair.
If you don't have a key-pair already, select Create a new key pair option and enter the name of the key pair. Then, click on the Download Key Pair to enable the Launch Instances button.
Once downloaded, hit the Launch Instances button to create a brand new EC2 Instance. The success screen should look like the following image.
It will take a few minutes to create and test your instance. Once done, your brand new EC2 instance is ready to connect with your ServerAvatar account.
So, Let's see How we can connect it with ServerAvatar.
First of all, Log in to your ServerAvatar account and select the team in which you want to add this EC2 instance.
Now, you will see a simple form to enter the essential details about your server. First of all, Enter the name of your server and the IPv4 Public IP of your EC2 instance.
As AWS does not provide root access, check the I don't have a root password checkbox.
Then select a web server you want to install on your EC2 instance. In this case, I have selected Apache.
Finally, click on the Connect Now! button and it will show you a command that you have to execute on your EC2 instance as a root.
Tip 1: If you are using Windows, Follow this tutorial by AWS to learn How to connect with your server via SSH using Putty.
Tip 2: If you are using Linux/Mac, click on the Connect button given in the AWS console to see the procedure to connect to your server via SSH.
To run any command as a root, execute the following command first.
$ sudo su
After executing this command, you will become a root user. Now, execute the command that ServerAvatar has provided you after clicking on the Connect Now! button.
If the execution of the ServerAvatar installation command as a root is successful, the server connection screen on ServerAvatar will start showing you the progress just like the following image.
It might take a few minutes to initially configure your server. Once your server is ready, ServerAvatar will redirect you to a server panel for your server. The Server panel should look like the following image.
So, this is how you can connect Amazon EC2 instances with your ServerAvatar account. It is easy, except if you are using AWS and ServerAvatar both for the first time.
If you have any questions regarding this tutorial or if you are facing any issues, please let us know in the comment section given below. We will get back to you with help as soon as possible.