All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Linux KEC instances

Last updated:2021-08-04 11:26:32

This topic describes how to purchase and use Linux KEC instances, including purchase, login, and data disk mounting.

Purchase a Linux KEC instance

  1. Log in to the KEC instance console.

  2. On the Instance page that appears, click Create Instance.

  3. In the Basic Configuration step, select a Linux image, complete relevant configuration, and then click Next.

  4. In the Network Configuration step, set Bind EIP to Buy New EIP or Purchase EIP Later in the EIP Console. Note that the number of EIPs to be purchased must be the same as the number of KEC instances.

  5. Set other parameters such as the VPC and click Next.

  6. In the System Configuration step, enter the system information and click Buy Now.

  7. Confirm the information and click Submit Order. If your account balance is insufficient, click Recharge, enter the corresponding amount, and then click Confirm.

  8. Click Instance in the left navigation pane, and check the KEC instance you have purchased in the list of KEC instances. The KEC instance is automatically started and is in the Running state.

Log in to a Linux KEC instance

A Linux KEC instance supports WebVNC login and SSH login.

The default username is ubuntu for the Ubuntu operating system and root for all other Linux operating systems. If you forget the password, you can reset the password in the console.

WebVNC login

  1. Log in to the KEC instance console.

  2. On the Instance page that appears, find the instance that you want to log in, and click Connect Instance in the Operation column. Note that the instance must be in the Running state.

  3. Enter the password and press Enter.

SSH login

Before you log in to an instance by using SSH, add an inbound rule in which port 22 is enabled to the security group to which the instance belongs. For more information about how to configure a security group, see Configure a security group.

This example uses the PuTTY tool in Windows as the SSH client.

  1. Start the PuTTY tool.

  2. Set the following parameters in the PuTTY Configuration dialog box:

    • Host Name (or IP address): Enter the public IP address of the KEC instance.
    • Port: Use the default port 22.
    • Connection type: Select SSH. PuTTY login.png
  3. Click Open.

  4. Enter the password and press Enter. The following figure shows the screen displayed after a successful login. Successful login as root.png

Mount a data disk

Format a data disk

  1. Run the fdisk -l command to view the data disks mounted to the KEC instance. View data disk information.png

  2. Partition data disks. This example uses the data disk named vdb. a. Run the fdisk /dev/vdb command to partition the data disk. b. Enter n to create partitions. c. Enter p to create a single partition or e to create multiple partitions. d. Enter the partition number. Value values: 1 to 4. e. Select the first sector of the partition. If you press the Enter key, the value 2048 is used by default. f. Select the last sector of the partition. If you press the Enter key, the maximum value is used by default. g. Enter w to complete partitioning and exit. Note: For more information about the method of formatting a data disk over 2 TB, see Partitioning and formatting of data disk of over 2 TB. Data disk partitioning.png

  3. Format the new data disk partition vdb1. This example uses the ext4 file system. Run the mkfs.ext4 /dev/vdb1 command. Format a data disk to ext4.png

Create a mount point and mount the data disk

  1. Create a mount point. This example uses the mount point named data. Run the mkdir /data command. mkdir.png

  2. Run the mount /dev/vdb1 /data command to manually mount the data disk vdb to the mount point data. mount.png

  3. Run the df -h command and check the mounted file system. dfh.png

Configure automatic mounting at startup

Enable automatic mounting at startup for the disk vdb. Otherwise, the file system will not be displayed after startup.

  1. Run the vim /etc/fstab command to open the /etc/fstab file.
  2. Add /dev/vdb /data ext4 defaults 0 0 at the end of the file. vim.png
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback