Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic Cloud Server/ Getting Started/ Purchasing and Using a Linux ECS (New Edition)

Purchasing and Using a Linux ECS (New Edition)

Updated on 2024-09-06 GMT+08:00

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.

This section uses the following configuration as an example to describe how to purchase and use an ECS:
  • Quantity: 1
  • Billing mode: yearly/Monthly
  • Flavor: s7n.xlarge.2 (4 vCPUs | 8 GiB memory)
  • OS: Linux
  • Login mode: key pair

Process

Procedure

Description

Preparations

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.

Step 1: Purchase an ECS

Set parameters about the basic configuration, instance, OS, storage & backup, network, and other configurations to purchase a Linux ECS.

Step 2: Log In to an ECS

Use PuTTY and a key pair to log in to an ECS.

Step 3: Use an ECS

Perform operations on an ECS.

Preparations

  1. 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.

  2. Top up your account.

    Ensure that your account has sufficient balance. If not, top up your account.

  3. 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.

  4. 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.

  5. 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.

  1. Log in to the management console and go to the ECS console.
  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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

  9. 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.

  10. 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.

  11. 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.

  12. In the Configuration Summary panel on the right side, confirm the ECS details.
    Figure 11 Configuration summary
  13. Read the select the agreement, and click Create.
  14. Pay for the order.
  15. 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).

  1. 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

    NOTE:

    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.

  2. Convert the format of the private key file to the .ppk format.
    1. Run PuTTYgen.
    2. 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
    3. In the Actions area, click Save private key to save the converted private key locally.
  3. Log in to the ECS using PuTTY.
    1. Double-click PUTTY.EXE. The PuTTY Configuration page is displayed.
    2. Choose Session and enter the EIP bound to the ECS in the Host Name (or IP address) configuration item.
      Figure 14 Configuring the EIP
    3. Choose Connection > Data. Enter the image username in Auto-login username.
      Figure 15 Entering the username
      NOTE:

      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.
    4. 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
    5. 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.

Table 11 Common ECS operations

Operation Type

If You Want To

Refer To

Connection

Learn more about ECS connection methods

Login Overview (Linux)

Website building

Build websites or applications on an ECS

Setting Up Websites on ECSs

Modification

Upgrade vCPUs and memory of an ECS

General Operations for Modifying Specifications

Upgrade the ECS bandwidth

Modifying an EIP Bandwidth

Expand the storage capacity

Change the ECS OS

Changing the OS

Open a port for ECS access

Configuring Security Group Rules

Backup

Back up ECS data

Backing Up an ECS

Monitoring, auditing, and management

View ECS metrics such as vCPUs, memory, bandwidth, and disks

Monitoring ECSs

View ECS operation records in the last seven days

Viewing Traces

Manage ECS resources by tag

Tag Management

Release

Release an ECS

Starting and Stopping ECSs

Bills

View ECS bills

Bills

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback