This topic describes how to install Alibaba Cloud CLI on macOS by downloading the installation package.
Procedure
Download the installation package for macOS.
Download links:
Official website: Direct download link for the latest version of Alibaba Cloud CLI.
GitHub: Download the Alibaba Cloud CLI of the required version from GitHub.
Assume that you have downloaded the installation package named aliyun-cli-macosx-3.0.16-amd64.tgz to the $HOME/aliyun directory.Decompress the downloaded file to obtain the executable file named
aliyun
.Run the following command to switch the current directory to $HOME/aliyun.
cd $HOME/aliyun
Run the following command to unzip the file aliyun-cli-macosx-3.0.16-amd64.tgz to $HOME/aliyun.
tar xzvf aliyun-cli-macosx-3.0.16-amd64.tgz
Set environment variables.
NoteBefore completing this step, make sure that the path /usr/local/bin exists in the system variable PATH. Otherwise, you must set available environment variables for
aliyun
.Run the following command to copy
aliyun
to /usr/local/bin.sudo cp aliyun /usr/local/bin
If you are the root user, remove the sudo command before you run the command.
After you set the environment variables foraliyun
, you can start using Alibaba Cloud CLI on your terminal.