edit-icon download-icon

For Windows system

Last Updated: Jan 08, 2018

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

Background information

Alibaba Cloud CLI is compiled based on Python and must run in Python environment. We recommended 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

  • Make sure that you have downloaded the Python 2.7.x installation package for Windows.

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

  • Make sure that your device has connected to the Internet.

Installation procedure

  1. Install Python by following its installation wizard.

    Note: When you install Python, enable pip. Otherwise, you cannot use pip to install Alibaba Cloud CLI.

  2. Upgrade 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, use the following command to upgrade pip to version 7.x or later first and then do as the follow-on steps.

    Run the following command to upgrade pip.

    1. cd C:\Python27
    2. python -m pip install -U pip

    If the following information is displayed, it indicates that 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. cd C:\Python27
    2. cd Scripts
    3. pip install aliyuncli

    If the following information is displayed, it indicates that 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. cd C:\Python27\Scripts
    2. pip install aliyun-python-sdk-rds

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

    1. Successfully installed 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. pip install --upgrade aliyun-python-sdk-rds
  5. Run the following command to verify the installation result.

    1. cd C:\Python27\Scripts
    2. aliyuncli rds help

    If the help information is displayed, it indicates that 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 result.

  6. To create an AccessKey, log on to the console of Alibaba Cloud official website, click AccessKeys and then create an AccessKey according to the prompts.

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

    1. cd C:\Python27\Scripts
    2. aliyuncli configure

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

    1. Aliyun Access Key ID [None]: <Enter AccessKeyId>
    2. Aliyun Access Key Secret [None]: <Enter AccessKeySecret>
    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 expected output format, json, text or table.>
  8. Run the following command to verify the configuration.

    1. cd C:\Python27\Scripts
    2. 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.