This article is simple guide to few basic and necessary git commands one should know. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
In the series of Cloud computing we had already seen the basics of cloud computing along with the type and architecture. Also we had discussed about the vendor of cloud computing that are present in the market. This article is the continuation of the last article user cloud computing series. In this article we will try to understand all about EC2 instance and we will try to launch the virtual machine and will host a static web page on the machine.
Before going ahead, First will try to understand what is EC2. EC2 is a virtual machine provided by Amazon Web Services. EC2 stands for Elastic compute cloud. We will break the 3 words and try to understand the real meaning. First is Elastic, it means which means object which can be resize, i mean which can be compressed and stretched, Compute means computer and at last cloud means Internet, We had discussed about cloud in our last tutorial. If we will combine the meaning of 3 words then it means “Computer hosted on cloud which can be stretched or compressed i mean which is elastic”. Now this is clear EC2 is a virtual machine which is hosted on cloud and it is provided by Amazon. Many other vendors like Azure, GCP also has their own virtual machine. In this article we will keep our focus on Amazon EC2.
After signing to AWS. click on login and provide the email and password to log in into the account. You will see the AWS Management Console. I suggest click on services which is present at the top left of the AWS management console.
After clicking on services the below screen will come, from services click on EC2 which we can see under compute section.
After clicking on EC2, we will be entering in EC2 console and there will be lots of options. Don’t worry, as of now we will concentrate only on how to launch EC2 instance and how to get logged in inside our virtual computer, that is nothing but EC2. We will look all the flavors in detail in our further section.
Under EC2 console we will have several options like Running Instance which sill show all the running instances under the AWS account. key pairs states that the number of key pairs present under the aws account. Key pair is needed when we will be logging in the virtual computer or EC2, and there are lots of option. we will discuss all the options in detail in our further articles. As i told earlier in this article our focus is mainly on EC2 instance. To launch instance click on launch instance present in the EC2 Console.
After launch instance, we need to select the type of AMI, AMI is nothing but Amazon Machine Image. we can think AMI as the the ISO image for the operating system. Actually AMI is more than that of ISO, We will discuss in detail about AMI in next article. For this use case i suggest select Amazon Linux 2 AMI. This is nothing but Red hat linux
After selecting AMI, Now we have to select the instance type. Instance type is the power of machine which we need to select. If you will see in console it will tell you clearly, what all the instance type is covered under the free tier, we will select t2.micro. There are lots of instance type, in real time we used to select this option as per our use cases. After selecting t2.micro click on next
Now we need to configure instance detail, as of now we will go with the default values of the instance detail. Now click on Next:Add storage
Under storage section we will not add any extra storage, If you want you can add extra storage by clicking on add storage button. As the storage is not part of this discussion we will skip this and we will go with the default one i mean will select only root storage. It will consist all the binary files and all the installation files of the machine. If you will compare this with your windows PC, In windows Laptop we have C drive which consists of all the binary values or all the installation files of your operating system, same in this case.
Now we will add tags. Tags are very useful, as in real-time we will be dealing with lots of instances. Tags will identify the instance. so i will suggest give tag name as per your project case.
After adding tags now we have to configure the security group. Security group allows who all can login into your machine. By default port 22 is open. This is port is used for SSH into the virtual machine. We can open the ports under the security group options. In our use case we will open port 80, as apache listens on port 80. Anyway we will discuss the security groups in detail in our further article. we will try to understand Inbound, Outbound and many more.
After configuring security groups click on Review and Launch. Click on Launch. Now we need to create a key-pair which we is required to SSH into the created EC2 instance. Click on create a new key pair and give name to key pair and most important click on download key pair. After clicking on download , .pem file will be downloaded in your download folder into your local machine. We need to convert this .pem file into .ppk file with the help of putty key gen.
Now click on Launch Instance. As soon as we had clicked on launch instance, it will take around 1–2 minutes and the instance will be up and running and this can be seen in the EC2 console.
On the EC2 console we will have all the information related to the EC2 instance like public IP, Private IP, Security group Information, VPC information and many more. As of now we are interested in public IP Information. With the help of public IP and key value pair we will be entering into this machine
After downloading install it in your local machine. After installation, keygen also get installed by default into the system. Keygen is required for converting the .pem to .ppk file. Search keygen into your search bar. Click on load(it loads the .pem into the putty key gen) and click on save. The ppk file is saved in your machine and now we will use this ppk file to logging in to the launched instance. With the help of public ip and ppk we will logged in to the virtual machine.
After getting into the machine we will update our machine using the command “sudo yum update”. Now we will install apache on the virtual machine with the command “sudo yum install httpd”. This command will install apache in your virtual machine
Now we will go to path “/var/www/html”. Under this path we will keep a static html page that needs to be display on the web browser. Below command is used to go the specified path
We will create a simple web page by using below command
sudo nano h1.html
Below html code we will use to create a simple static web page. You are free to use any web page html or java script code that you need to display on the web page.
<title>Welcome, this is akash</title>
<h1>Congrats, apache is working on EC2</h1>
Congratulations, we had launched ec2 instance and also we had configured apache server on the vitual machine along with the simple web page hosting. If its not working for you i suggest use the command
sudo systemctl start httpd
Below web page is there that we can see over the browser.
In the next article we will try to understand the components of EC2 instance in detail, and also we will see some other services in amazon web services. If you want to know more about cloud computing i suggest go through my 1st article in this series. The link for the article is below.
If you have any confusion regarding this article and creating AWS account, please comment below i will happy to respond. We will discuss more on AWS services in our next article under the series of cloud computing.
biaya operasi selaput dara Perbedaan Wanita Perawan dan Sudah Tidak Perawan Dalam masyarakat, terdapat perbedaan pandangan terkait status perawanitas wanita. Meskipun topik ini sangat sensitif…
Menjadi perempuan di dunia Adam bukan perkara mudah, sebab kemuliaan diukur dari seberapa dalam buah dada dan kemaluan disembunyikan. Apalagi jika sudah menyangkut soal kekerasan seksual, tubuh…
We see GODs as perfect projection of ours. The concept of GOD is manifestation of our own perfect self. While the question of whether there exist a GOD exterior to us, who looks down on us from a…