Purchasing and Using a Linux ECS
Scenarios
Elastic Cloud Server (ECS) is a cloud server that provides scalable, on-demand compute 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, flavor, and login mode.
- Quantity: 1
- Billing mode: yearly/monthly
- Flavor: s6.xlarge.2 (4 vCPUs | 8 GiB of memory)
- OS: Linux
- Login mode: key pair
Procedure
| Step | Description | 
|---|---|
| Sign up for a HUAWEI ID, 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 a HUAWEI ID 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 or has a valid payment method configured. If not, make payments. 
- 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 more information, 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 . 
- 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 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 Select the yearly/monthly billing mode. 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 EU-Dublin 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 After you select a random AZ, the system will select 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 s6.xlarge.2 Select appropriate specifications 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) Select a free public Linux image provided by Huawei Cloud. 
- Set Storage & Backup.
    Figure 4 Storage & backup  Table 4 Storage & backup parameters Parameter Example Description Disk Type General Purpose SSD A system disk will be 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 Select the default VPC and subnet. For details, see VPC and Subnet Planning. Primary NIC - Primary NIC: subnet-default
- Automatically assign IP address
 Source/Destination Check Enable 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 Select the default security group. 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 Purchase an EIP and bind it 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 Specify an ECS name based on naming rules. Login Mode Key pair Select the key pair login mode. Key Pair KeyPair-4f7f You can use an existing key pair or create another one. 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 Auto recovery Enable If a physical server accommodating ECSs breaks down, the ECSs with auto recovery enabled will automatically be migrated to a functional server to minimize the impact on your services. During this process, the ECSs will restart. For details, see Automatically Recovering ECSs. 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 Specify the ECS required duration, from one month to one year. Quantity 1 If the number of ECSs you want to create exceeds the quota, increase the quota. 
- In the Configuration Summary panel on the right side, confirm the ECS details.
    Figure 11 Configuration summary  
- Read and agree to the agreement, and click Submit.
- Pay for the order.
- Go back to the ECS list and view the purchased ECS.
    Figure 12 Viewing the purchased 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 dialog box is displayed.
- Choose Session and enter the EIP bound to the ECS for Host Name (or IP address).
      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 and use the ECS.
| 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 | ||
| 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.
 
    