Excellent software and practical tutorials
How to create an Amazon EC2 Linux server
create Amazon EC2 Linux server It is a very simple thing. I have previously introduced how to register with Amazon.AWS's account,AWSAfter registration, you can use a variety ofCloud ServerServices such as Amazon'sEC2Cloud Server. Before creating an EC2 cloud server, let's first understand what Amazon EC2 is.
If you haven't registered for AWS yet, you can refer to the previous registration tutorial:
Free Amazon S3 backup WordPress website data and AWS registration tutorial
Click to visit AWS China official website
Click to visit Amazon Web Services official website
What is Amazon EC2?
Simply put, Amazon EC2 is a virtual machine that can be installed with Linux or Windows operating systems. Today we will mainly introduce how to install a Linux virtual machine.
Amazon EC2 provides a rich set of features, including instances, AMIs, instance types, key pairs, instance store volumes, Amazon EBS volumes, regions and availability zones, security groups, elastic IP addresses, tags, and virtual private clouds (VPCs). Instances are virtual servers, while AMIs are pre-configured templates that contain the components required for a server. Instance types cover a variety of configurations, including CPU, memory, storage, network capacity, and graphics hardware. Key pairs provide secure login information for instances, while instance store volumes and Amazon EBS volumes provide storage for temporary and persistent data. Regions and availability zones are multiple physical locations for storing resources, while security groups allow configuration of virtual firewalls to control access. Elastic IP addresses provide static IPv4 addresses, and tags are used to create and assign metadata for resources. Finally, virtual private clouds (VPCs) allow the creation of isolated virtual networks, with the option to connect to your own network.
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable, on-demand computing capacity in the Amazon Web Services (AWS) cloud. Using Amazon EC2 reduces hardware costs, so you can develop and deploy applications faster. You can use Amazon EC2 to launch as many virtual servers as you need, configure security and networking, and manage storage. You can add capacity (scale up) to handle compute-intensive tasks, such as monthly or annual processes or spikes in website traffic. If usage decreases, you can reduce capacity again (scale out).
The above diagram shows the basic architecture of an Amazon EC2 instance deployed in an Amazon Virtual Private Cloud (VPC). In this example, the EC2 instance is located in an Availability Zone in the region. The EC2 instance is protected by a security group, which is a virtual firewall that controls incoming and outgoing traffic. The private key is stored on the local machine and the public key is stored on the instance. These two keys are designated as a key pair to prove the user's identity. In this case, the instance is backed by an Amazon EBS volume. The VPC communicates with the internet through an internet gateway.
Creating an Amazon EC2 Linux instance
We have already introduced what Amazon EC2 is. Now let’s introduce how to create a virtual machine in Amazon EC2.
The EC2 cloud computing instances provided by AWS have some restrictive requirements.Free Server.
The following is a summary of the limitations of EC2 servers.
- Amazon Virtual Private Cloud: 750.0 hours free for 12 months
- Amazon Elastic Compute Cloud: 750.0 free hours for 12 months, 30.0 GB-Mo free for 12 months
- AWS Data Transfer: 100.0 GB/month always free
EC2's Linux instance is free for 12 months, including 30GB of hard disk space and 100GB of traffic per month.
100G of traffic is barely enough for a small blog with little traffic. But if it is a website with too much traffic, you will need to pay.
EC2 Linux instances are suitable for cloud computing services, but not for building websites. If you want to build a website, you can choose AWS Lightsail. AWS Lightsail will be introduced in detail later.
Next we start creating an EC2 Linux instance
The first step is to log in to the EC2 cloud server operation interface
In the EC2 operation interface, you can clearly see the instance usage and the monthly usage of the free package. On the left is the EC2 operation menu.
Step 2: Select the region
In the upper right corner is the region where the EC2 cloud server is located. This region is critical. If you want to create an EC2 cloud server in Singapore, you need to select Singapore in the upper right corner.
Click the region in the upper right corner, scroll to the bottom, and click Manage Region. In the AWS region, some areas are not enabled. If you want to use them, you need to check the region and then click Enable.
The default Hong Kong region is disabled. If you want to use EC2 in Hong Kong, you need to check Hong Kong and then click Enable. You need to wait patiently for a few seconds during the enabling process. Only when the status changes to Enabled can you use the EC2 cloud server in Hong Kong.
Step 3: Create an instance
Click the orange button in the instance to start a new instance
Go to the instance creation page and start creating an instance.
Before creating an instance, you need to understand and pay attention to the following limitations of creating a free tier:
Free Tier: Free Tier: The first year includes 750 hours per month of t2.micro (or t3.micro in regions where t2.micro is not available) instance usage on Free Tier AMIs, 750 hours per month of public IPv4 address usage, 30 GiB of EBS storage, 2 million ingress and egress, 1 GB snapshots, and 100 GB of internet bandwidth.
Name and Label
Enter a custom instance name, for example: HK001
Application and OS images
Select the operating system you want to install. There are system images for Linux and Windows.
Let's take Ubuntu installation as an example:
Click on the Ubuntu image, and then select the version to install below. Note that in the process of selecting the version, you must selectFree tier eligible
Instance types and key pairs
When choosing an instance type, be sure to choose a free tier that meets the requirements. The t3.micro in Hong Kong has 2vCPU and 1G content. The t2.micro in other regions has 1vCPU. The CPU computing power in Hong Kong is higher.
The key pair is used to log in to the server. You need to create a new key pair here, otherwise you will not be able to log in to the server.
Fill in the key pair name and select the default.
After clicking Create Key Pair, the key pair will be downloaded to your local computer. Keep it properly. This key pair is used to log in to the server via SSH.
Note: If you are unable to connect using ssh, please upgrade the ssh tool to the latest version.
Network Settings
In the network settings, check the two boxes below to allow http/https traffic from the Internet.
Then create a new security group.
Configuration Storage
AWS provides a free 30G hard drive. Just fill in 30 in the configuration storage.
After selecting the above content, click Start Instance on the right, and the EC2 server will be created successfully.
Now you can use SSH to connect to your EC2 cloud server.
If you want to delete an EC2 cloud server, just select the server and then click Terminate Instance in the Instance Status!
That’s it for creating a Linux cloud server in AWS!
Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1
https://aws.amazon.com/cn/free/?trk=98312eff-b02b-4c76-83da-73fc1ffa502d&sc_channel=sm