You can use Simple Log Service CLI to perform various operations in Simple Log Service. For example, you can manage projects, manage Logstores, query logs, enable automatic pagination, and replicate data across multiple regions and accounts. This topic describes how to install Simple Log Service CLI.
Read before installation
Simple Log Service CLI is developed based on Python. You must install Python before you can use Simple Log Service CLI. For more information, visit the official Python website.
Item | Description |
Current CLI version | 0.2.6 Note You can run the installation command to upgrade the CLI. We recommend that you upgrade the CLI to the latest version. |
Source code | |
Supported Python versions | Python 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, and 3.9 |
Supported operating systems | Windows, Linux, and macOS |
Dependent components | After Python is installed, we recommend that you run the
|
Install Simple Log Service CLI in Linux
Log on to a Linux server.
Run the following command to install the CLI:
pip3 install aliyun-log-python-sdk aliyun-log-cli -U --no-cache
Verify the installation result.
Run the following command:
aliyunlog --version
If a corresponding output is returned, Simple Log Service CLI is installed.
Install Simple Log Service CLI in Windows
Log on to a Windows server..
Open Command Prompt.
If you configured Python environment variables, you can skip this step and directly run the installation command. If the pip3 installation command cannot be identified, the required Python environment variables are not configured. You can run the cd command to navigate to the Python installation path and then run the installation command.
Run the following command to install the CLI:
pip3 install aliyun-log-python-sdk aliyun-log-cli -U --no-cache
Verify the installation result.
Run the following command:
aliyunlog --version
If a corresponding output is returned, Simple Log Service CLI is installed.
Install Simple Log Service CLI in macOS
We recommend that you use the pip3 installation command to install Simple Log Service CLI. Sample command:
pip3 install -U aliyun-log-cli --no-cache
Upgrade Simple Log Service CLI
You can run the installation command to upgrade the CLI. We recommend that you upgrade the CLI to the latest version.
Uninstall Simple Log Service CLI
If you no longer require Simple Log Service CLI, you can uninstall Simple Log Service CLI. You can run the following command to uninstall Simple Log Service CLI:
pip3 uninstall aliyun-log-cli