edit-icon download-icon

For Linux/UNIX/Mac OS systems

Last Updated: Dec 20, 2017

Alibaba Cloud CLI is a management tool created based on Alibaba Cloud APIs. With this tool, you can call Alibaba Cloud APIs and manage your RDS.

Background information

Alibaba Cloud CLI is developed based on Python and runs in Python environment. We recommend that you install Alibaba Cloud CLI using pip, which can be applied to Windows, Linux, and Mac OS.

For more information about Python, go to Python website. For more information about pip, go to pip website.

Prerequisites

  • Download the Python 2.7.x installation package for Windows.

    Go to Python official website download page to download Python 2.7.x installation package.

  • Connect your servers to the Internet.

Installation procedure

  1. Install Python according to its installation wizard.

    When installing Python, you must enable pip. Otherwise, you cannot use pip to install Alibaba Cloud CLI.

  2. Install pip.

    If you have installed pip version 7.x or later, skip to step 3.

    If the version of pip installed on your device is too old, the installation of Alibaba Cloud CLI fails. You can use the following command to upgrade pip first.

    Run the following command to upgrade pip.

    1. pip install -U pip

    If the following information is displayed, pip has been successfully upgraded.

    1. Successfully uninstalled pip-7.1.2
    2. Successfully installed pip-8.1.2
  3. Run the following command to install Alibaba Cloud CLI.

    1. sudo pip install aliyuncli

    If the following information is displayed, Alibaba Cloud CLI has been successfully installed.

    1. Successfully installed aliyuncli-2.1.2 colorama-0.3.3 jmespath-0.7.1
  4. Run the following command to install RDS SDK.

    1. sudo pip install aliyun-python-sdk-rds

    If the following information is displayed, RDS SDK has been successfully installed.

    1. Successfully installed aliyun-python-sdk-core-2.0.35 aliyun-python-sdk-rds-2.0.3

    If your RDS SDK is not the latest version, run the following command to upgrade the existing RDS SDK.

    1. sudo pip install --upgrade aliyun-python-sdk-rds
  5. Run the following command to verify the installation result.

    1. aliyuncli rds help

    If the help information is displayed, RDS SDK has been successfully installed.

    Note: you can also run the command aliyuncli rds help to query other commands, which can be used to verify the configuration.

  6. Create an AccessKey. Log on to the Alibaba Cloud console to create an AccessKey according to the prompts.

  7. Run the following command to configure the global parameters of Alibaba Cloud CLI.

    1. sudo aliyuncli configure

    If the following information is displayed, enter the parameters listed.

    1. Aliyun Access Key ID [None]: <Enter Access Key ID>
    2. Aliyun Access Key Secret [None]: <Enter Access Key Secret>
    3. Default Region Id [None]: <Enter the RegionId of your instance, such as **cn-hangzhou**. Run aliyuncli rds DescribeRegions --output table to query the region list.>
    4. Default output format [None]: <Enter your desired output format, json, text or table.>
  8. Run the following command to verify the configuration.

    1. aliyuncli rds DescribeAccounts --DBInstanceId xxxxx

    If the information about your instance account is displayed, it indicates that your instance has connected to Alibaba Cloud.

Thank you! We've received your feedback.