Resource Orchestration Service (ROS) allows you to use Alibaba Cloud CLI to create,
view, update, and delete stacks. This topic describes how to install Alibaba Cloud
CLI.
Background information
You can install Alibaba Cloud CLI by downloading the installation package or compiling
the source code. This topic describes how to download the installation package. To
install Alibaba Cloud CLI by compiling the source code, see Install CLI.
Alibaba Cloud CLI can be used in the following scenarios:
- You cannot use the Alibaba Cloud Management Console.
- You need to manage stacks by calling API operations, such as when you need to view
and delete stacks or view resource types.
Install Alibaba Cloud CLI on Windows
- Go to the download page on the Alibaba Cloud official website or GitHub, and download the installation package for Windows.
- Decompress the package to obtain the executable file aliyun.exe.
- Add the path of the directory where the aliyun.exe file is stored to the Path environment variable.
- In the Environment Variables window, select Path in the user variables section and click Edit.
- In the Edit Environment Variable window, click Create.
- In the Edit Environment Variable window, enter the path of the directory where the aliyun.exe file is stored.
- In the Edit Environment Variable window, click OK.
- In the Environment Variables window, click OK.
- Run the following commands in the terminals to check whether the environment variable
is configured:
- CMD:
set path
- PowerShell:
env:path
- Run the following command in the terminal to check whether Alibaba Cloud CLI is installed:
If the system displays the current version number that is shown in the following example,
Alibaba Cloud CLI is installed.
3.0.32
Install Alibaba Cloud CLI on Linux
- Go to the download page on the Alibaba Cloud official website or GitHub, and download the installation package for Linux.
- Run the following command to obtain the executable file aliyun:
cd $HOME/aliyun
tar xzvf aliyun-cli-linux-3.0.32-amd64.tgz
Note The preceding command assumes that the package is downloaded and decompressed to the
$HOME/aliyun directory.
- Run the following command to copy the aliyun file to the /usr/local/bin directory:
sudo cp aliyun /usr/local/bin
Note If you are the root user, remove sudo from the command.
Install Alibaba Cloud CLI on macOS
- Go to the download page on the Alibaba Cloud official website or GitHub, and download the installation package for macOS.
- Run the following command to obtain the executable file aliyun:
cd $HOME/aliyun
tar xzvf aliyun-cli-macosx-3.0.32-amd64.tgz
Note The preceding command assumes that the package is downloaded and decompressed to the
$HOME/aliyun directory.
- Run the following command to copy the aliyun file to the /usr/local/bin directory:
sudo cp aliyun /usr/local/bin
Note If you are the root user, remove sudo from the command.