Purchasing and Using a Linux ECS (New Edition)
Scenarios
Elastic Cloud Server (ECS) is a cloud server that provides scalable, on-demand computing resources, including vCPUs, memory, OS, and Elastic Volume Service (EVS) disks. After purchasing an ECS, you can use it like using your local computer or physical server.
You can create an ECS by specifying its vCPUs, memory, OS, specifications, and login mode.
- Quantity: 1
- Billing mode: yearly/Monthly
- Flavor: s7n.xlarge.2 (4 vCPUs | 8 GiB memory)
- OS: Linux
- Login mode: key pair
Process
Procedure |
Description |
---|---|
Sign up for Huawei Cloud, enable Huawei Cloud services, complete real-name authentication, top up your account, and create resources such as VPCs, subnets, security groups, and key pairs. |
|
Set parameters about the basic configuration, instance, OS, storage & backup, network, and other configurations to purchase a Linux ECS. |
|
Use PuTTY and a key pair to log in to an ECS. |
|
Perform operations on an ECS. |
Preparations
- Sign up for Huawei Cloud and complete real-name authentication.
Before purchasing an ECS, sign up for a HUAWEI ID and enable Huawei Cloud services and complete real-name authentication first.
If you have enabled Huawei Cloud services and completed real-name authentication, skip this step.
- Top up your account.
Ensure that your account has sufficient balance. If not, top up your account.
- Plan network resources, such as VPCs and subnets.
When you are purchasing an ECS, the system creates a default VPC (vpc-default) and subnet (subnet-default).
If you do not want to use the default VPC and subnet, you can create a VPC and subnet in the corresponding region in advance. For details, see VPC and Subnet Planning.
- Create a security group and add rules to it.
When you are purchasing an ECS, the system creates default security groups (default, Sys-WebServer, and Sys-FullAccess). For details about default security groups, see Default Security Groups and Rules.
If the default security groups and rules cannot meet your service requirements, you can modify them. For details, see Configuring Security Group Rules.
- Create a key pair.
To log in to the ECS using a key pair, create one on the management console.
Step 1: Purchase an ECS
The following is an example for your reference. For more details, see Purchasing an ECS.
- Log in to the management console and go to the ECS console.
- Set Basic Configuration.
Figure 1 Basic configuration
Table 1 Basic configuration parameters Parameter
Example
Description
Billing Mode
Yearly/Monthly
Prepaid billing. You pay in advance for a subscription term, and in exchange, you get a discounted rate. Ensure that you have a top-up account with a sufficient balance or have a valid payment method configured first.
For details, see Billing Overview.
Region
CN-Hong Kong
For lower network latency and faster resource access, select the region nearest to your target users. After an ECS is purchased, the region cannot be changed. Exercise caution when selecting a region.
For details, see Region and AZ.
AZ
Random
The system selects a default AZ based on your Universally Unique Identifier (UUID). The AZ of a purchased ECS cannot be changed.
- Set Instance.
Figure 2 Instance
Table 2 Instance parameters Parameter
Example
Description
Search Filters
s7n.xlarge.2
Instance favor. Select an appropriate one based on service requirements. For details, see A Summary List of x86 ECS Specifications.
- Set OS.
Figure 3 OS
Table 3 OS parameters Parameter
Example
Description
Image
CentOS 7.9 64bit (40 GiB)
A free public Linux image provided by Huawei Cloud.
Host protection (HSS)
Basic Edition
HSS Basic Edition is free for one month. It provides functions such as weak password and vulnerability detection.
For details, see HSS.
- Set Storage & Backup.
Figure 4 Storage & backup
Table 4 Storage & backup parameters Parameter
Example
Description
Disk Type
General Purpose SSD
A system disk is automatically created and initialized upon ECS creation. It stores the OS of an ECS.
For details, see EVS Overview.
System Disk (GiB)
40
(Optional) Enable backup
- Vault Name: vault-eb70
- Capacity: 80 GiB
- Backup Policy: defaultPolicy
CBR lets you restore data to any point in the past if there is a virus attack, accidental deletion, or software or hardware fault.
For details, see CBR Overview.
- Set Network.
Figure 5 Network
Table 5 Network parameters Parameter
Example
Description
VPC
VPC: vpc-default
The default VPC and subnet automatically created along with the ECS.
For details, see VPC and Subnet Planning.
Primary NIC
- Primary NIC: subnet-default
- Automatically assign IP address
Source/Destination Check
Enable Source/Destination Check
By default, Source/Destination Check is enabled.
When this function is enabled, source IP addresses in the outbound packets will be checked. If the IP addresses are incorrect, the packets will not be sent out.
- Set Security Group.
Figure 6 Security group
Table 6 Security group parameters Parameter
Example
Description
Security Group
default
The default security group automatically created along with the ECS.
For details, see Security Group Overview.
- Set Public Network Access.
Figure 7 Public network access
Table 7 Public network access parameters Parameter
Example
Description
EIP
Auto assign
A public IP address bound to the ECS for public network access.
For details, see EIP Overview.
EIP Type
Dynamic BGP
Billed By
Bandwidth
Bandwidth Size
5 Mbit/s
- Set Instance Management.
Figure 8 Instance management
Table 8 Instance management parameters Parameter
Example
Description
ECS Name
ecs-example
Custom ECS name.
Login Mode
Key pair
A key pair for logging in to an ECS.
Key Pair
KeyPair-4f7f
You can use an existing or create a new key pair, and ensure that you have obtained the private key.
For details, see Creating a Key Pair on the Management Console.
Enterprise Project
default
This parameter is displayed only when you use an enterprise account to purchase an ECS.
It enables unified management of cloud resources by project.
- Set Advanced Settings.
Figure 9 Advanced settings
Table 9 Advanced settings Parameter
Example
Description
Detailed monitoring
Enable
Detailed monitoring is enabled by default. It enables 1-minute fine-grained monitoring of ECS metrics, such as vCPUs, memory, network, disks and processes.
For details, see Monitoring ECSs.
- Set Purchase Details.
Figure 10 Purchase details
Table 10 Purchase details Parameter
Example
Description
Required Duration
1 month
ECS required duration, from one month to one year.
Quantity
1
To ensure effective resource usage, an upper limit is set on the ECSs to be created. If the number of ECSs you need exceeds the upper limit, increase quota.
- In the Configuration Summary panel on the right side, confirm the ECS details.
Figure 11 Configuration summary
- Read the select the agreement, and click Create.
- Pay for the order.
- Go back to the ECS list and view the purchased ECS.
Figure 12 Viewing an ECS
Step 2: Log In to an ECS
The following shows how to use PuTTY and a key pair to log in to an ECS from a local Windows server. For more login methods, see Login Overview (Linux).
- On the local Windows server, download PuTTY and PuTTYgen and run PuTTYgen from the following:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
PuTTYgen is a key generator, which is used to create a key pair that consists of a public key and a private key for PuTTY.
When you use PuTTY to log in to an ECS, the private key file must be in .ppk format, but the private key file generated from the console is in .pem format. You need to convert its format using PuTTYgen.
- Convert the format of the private key file to the .ppk format.
- Run PuTTYgen.
- In the Actions area, click Load and import the private key file set in 9.
Ensure that the format of All files (*.*) is selected.
Figure 13 Importing the private key file
- In the Actions area, click Save private key to save the converted private key locally.
- Log in to the ECS using PuTTY.
- Double-click PUTTY.EXE. The PuTTY Configuration page is displayed.
- Choose Session and enter the EIP bound to the ECS in the Host Name (or IP address) configuration item.
Figure 14 Configuring the EIP
- Choose Connection > Data. Enter the image username in Auto-login username.
Figure 15 Entering the username
When you log in to an ECS using an SSH key:
- The image username is core for a CoreOS public image.
- The image username is root for a non-CoreOS public image.
- Choose Connection > SSH > Auth > Credentials. In the configuration item Private key file for authentication, click Browse and select the private key converted in step 2.
Figure 16 Importing the private key file
- Click Open to log in to the ECS.
Step 3: Use an ECS
After purchasing an ECS, you can build websites or applications on the ECS and manage it.
Operation Type |
If You Want To |
Refer To |
---|---|---|
Connection |
Learn more about ECS connection methods |
|
Website building |
Build websites or applications on an ECS |
|
Modification |
Upgrade vCPUs and memory of an ECS |
|
Upgrade the ECS bandwidth |
||
Expand the storage capacity |
||
Change the ECS OS |
||
Open a port for ECS access |
||
Backup |
Back up ECS data |
|
Monitoring, auditing, and management |
View ECS metrics such as vCPUs, memory, bandwidth, and disks |
|
View ECS operation records in the last seven days |
||
Manage ECS resources by tag |
||
Release |
Release an ECS |
|
Bills |
View ECS bills |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot