Skip to main content
Version: 1.0

Guide

This document is a simplified version of AlibabaCloud official documentation, combined with the actual operation of the deployment, to help you quickly master The most basic skills.

ECS

You can change the manage ECS from Alibaba Cloud console:

Create ECS

  1. Login to Console, open:【Elastic Compute Service】>【Instances】>【Create Instance】 create ecs

  2. Select the payment method, instance type like these type

    • Subscription: Allows you to pay upfront and then use the service over a period of time.
    • Pay-As-You-Go: A billing method based on the amount of resources you actually use.
    • Preemptive Instance: A billing method based on the amount of resources you actually use.
  3. Select the Image step is very important

    • Public Image: Alibaba Cloud provides official public images.
    • Custom Image: Created from system snapshots of yourself
    • Shared Image: Other user shared for you
    • Marketplace Image: Alibaba Cloud Marketplace provides hundreds of high-quality third-party images that have undergone a strict review process.
  4. If you use the Marketplace Image, suggest use the search key "websoft9"

    search websoft9 image

  5. Select the image you want to use

  6. Go to next steps, include set Networking, System Configurations and so on

  7. Wait 2-3 minutes for the ECS running when completed these steps

Create Key Pairs

You should create Key Pairs before create ECS if you want to use Key Pairs for ECS connection

  1. Login to Console, open:【Elastic Compute Service】>【Network and Security】>【Create Key Pairs】 Key Pairs

  2. Set the SSH Key Pair Name and select Creation Mode

  3. When you complete the creation, please download the ××××.pem to your local computer

Connect ECS

Blow are the methods for you to connect ECS of Alibaba Cloud:

MethodsDetails
Local SSH ConnectionInstall Putty to your local computer and run it
Workbench ConnectionAn online web-based tool of AlibabaCloud
VNC ConnectionVNC online web-based tool of AlibabaCloud, you can use it when you can not run Putty or Workbench
Send Remote Commands (Cloud Assistant)To send remote commands, you must use the task execution feature provided by Cloud Assistant

We use Workbench Connection to show you how to connect Linux:

  1. Login to Console and list all you ECS, then click 【Connect】action for your target ECS Connect Action

  2. Then, click the 【Send Remote Call】button of 【Send Remote Commands (Cloud Assistant)】

  3. Waiting for loading, and input username and password or Key Pairs to connect it

Reset password

You can reset the ECS's password by the flowing method:

Reset by Console
  1. Login to AlibabaCloud console, list the ECS

  2. Open the menu:【Password/Key Pair】>【Reset Password】 reset password reset password

  3. Restart the ECS and it take effect

Reset by Command
  1. Login to AlibabaCloud console, list the ECS

  2. Open the menu:【Connect】>【Send remote call】

  3. Input your command like below click 【Run】 button

    echo "yourpassword" | passwd --stdin root  
  4. You can receive below message when running successfully

    Changing password for user root.
    passwd: all authentication tokens updated successfully.

Upgrade/Downgrade

If you want to change the ECS configuration for business, you should Upgrade or Downgrade it

  1. Login to AlibabaCloud console, list the ECS

  2. Open the 【Upgrade/Downgrade】menu of the target ECS upgrade

  3. You can choose from the following upgrade or downgrade schemes

Reinitialize ECS

If you want to recover to ECS to the state of first installation, you need 【Reinitialize Disk】operation:

  1. Login to AlibabaCloud console, list the ECS

  2. Stop your the target ECS

  3. Open the menu: 【More】>【Disk and Image】>【Reinitialize Disk】 Reset System disk

  4. Go to the next steps

Could you distinguish Reinitialize Disk and Replace System Disk?

Backup

The best backup method is automatic backup, you can use the Snapshot function of AlibabaCloud to backup your Disk automatically.

You can backup your disk by the below methods:

Set automatic Snapshot

  1. Login to Console, open:【Elastic Compute Service】>【Storage & Snapshots】>【Snapshots】

  2. Click the 【Automatic Snapshot Policies】to list and create a policy for you create Snapshot policy

  3. Apply or Disable Automatic Snapshot Policy for your disk Apply or Disable Automatic Snapshot

  4. Then you can see that you disk have set snapshot successfully Disk snapshot

Create Custom Image

If you don't want to set Snapshot, you can create a custom image for your ECS

  1. Login to Console and list all ECS

  2. Open the menu 【Disk and Image】>【Create Custom Image】 for your target ECS Create custom image

  3. Go to the next steps

Disk, Snapshot and Image

Create Snapshot

  1. Login to AlibabaCloud console, lis all disk by 【Elastic Compute Service】>【Disk】

  2. Click the【Create Snapshot】 button to start it disk to snapshot

  3. Go to the next steps to complete it

Create Image

Image can be created based on snapshots, and image can be created based on ECS.

By ECS
  1. Login to AlibabaCloud console, lis all ECS by 【Elastic Compute Service】>【Instances】

  2. Click the menu 【Disk and Image】>【Create Custom Image】 create image

  3. Go to the next steps to complete it

By Snapshot
  1. Login to AlibabaCloud console, lis all disk by 【Elastic Compute Service】>【Storage & Snapshots】>【Snapshots】

  2. Select your Snapshot and create an Image for it create image

  3. Go to the next steps to complete it

By local image

You can also create Image by OSS file which is your uploaded your local image

  1. Login to AlibabaCloud console, lis all ECS by 【Elastic Compute Service】>【Instances and Images】>【Images】

  2. Then click the Import Image link to create image by OSS file create image by OSS file

  3. Set the parameters and you must select the correct Operating System/Platform for you image

    What the difference between 【Others Linux】 and 【Customized Linux】? refer to here

Create Cloud disks

  1. Login to Console to list all disk by 【Elastic Compute Service】>【Storage & Snapshot】>【Disk】

  2. Click the 【Create Disk】 button Create Disk

  3. Set the Storage and Disk Name Set the disk

  4. Attach your disk to target ECS Mout Disk

  5. Then create partitions and file systems after the disk is attached to the instance

Detach Cloud disks

  1. Login to Console to list all disk by 【Elastic Compute Service】>【Storage & Snapshot】>【Disk】

  2. Click the 【More】>【Detach】 Detach Disk

  3. Go to the next steps

Resize Disks

You can resize your System Disk and Data Disk online by console

Resize most of time mean increase disk storage

  1. Login to Console to list all disk by 【Elastic Compute Service】>【Storage & Snapshot】>【Disk】

  2. Click the 【More】>【Resize Disk】 Resize Disk

  3. Check option【Online Resizing

  4. Waiting for the result

Mount Disks

If you run df -m to list all file system and found that there not increase disk storage, how to resolve it?

  1. Connect ECS and install growpart for it

    yum install -y cloud-utils-growpart
    growpart /dev/vda 1
  2. Add the new added disk to the first partition

    # Attach to the first partition of first disk (System Disk)
    growpart /dev/vda 1

    # Attach to the first partition of second disk (Data Disk)
    growpart /dev/vdb 1
  3. Run the file system command

    # ext
    resize2fs /dev/vda1

    # xfs
    xfs_growfs /dev/vda1

Network and Security

Check IP

  1. Login to console, lis all ECS by 【Elastic Compute Service】>【Instances and Images】>【Instances】

  2. You can get the Public IP from the list table directly get ip

Change IP

You can also change the Public IP for your ECS

  1. Login to console, lis all ECS by 【Elastic Compute Service】>【Instances and Images】>【Instances】

  2. Stop the ECS which you want to change IP for it

  3. Open the menu: 【More】> 【Network and Security Group】>【Change Public IP Address】 change ip

  4. Go to the next steps to complete it

Security Group

A security group acts as a virtual firewall for Elastic Compute Service (ECS) instances to control inbound and outbound traffic and improve security. You can use security groups and security group rules to define security domains in the cloud.

Below is a sample for you how to Enable TCP:80 port on security group:

  1. Login to console, lis all ECS by 【Elastic Compute Service】>【Instances and Images】>【Instances】

  2. Open the menu: 【More】> 【Network and Security Group】>【Configure Security Group】 ecs change security

  3. Click the 【Add Rules】button to list all rules ecs change security

  4. Then, add a new rule by click the 【Add Rule】button授权对象一般为较为合适

    • Destination set to HTTP(80)
    • Source set to 0.0.0.0/0
  5. Save it

Domain Name

Domains is a domain name management platform that provides domain name registration, transaction, monitoring, and protection services.

Below steps is need for you to enable domains visit of your application:

Resolve Domain

Resolve Domain mean that you set a mapping relations between domain and ECS's IP

  1. Buy your Domain and register it

  2. Login to console, lis all domains by 【AlibabaCloud DNS】 Add a record

  3. Add an Add Record for it Add a record

  4. Save it and wait for 2-10 minute, then your DNS is take effect

Domain Beian

If you ECS is created in China, and you want to use Domain for application, you must complete the Domain Beian for Government governance.

Refer to: Domain Beian