# alinux-software

Part of **ALINUX**

# Alibaba Cloud Linux Software and Kernel Management Console Guide

## Operations Overview

| Operation | Console Entry Path | Prerequisites | Description |
|----------|-------------------|---------------|-------------|
| Install Python Versions | Products > Elastic Compute Service (ECS) > Images > Alibaba Cloud Linux 3 | - Alibaba Cloud Linux 3 installed<br>- Root or sudo access<br>- Network connectivity to YUM repositories | Install Python 3.8, 3.10, 3.11, or 3.12 via YUM and manage versions using virtual environments to avoid system conflicts |
| Upgrade curl Version | N/A (terminal-only operation after ECS access) | - Remote connection to an Alibaba Cloud Linux 2 ECS instance | Install and enable curl-7.61.1 from the experimental repository without replacing the system default curl |
| Install Alibaba Cloud Compiler | N/A (terminal-only operation after ECS access) | - ECS instance running Alibaba Cloud Linux 3 | Install the Alibaba Cloud Compiler based on Clang/LLVM-13 with support for C++20 Modules, Coroutines, ThinLTO, AutoFDO, and CoreBOLT |

## Step-by-Step Instructions

### Install Python Versions

**Navigation**: Console > Elastic Compute Service (ECS) > Images > Alibaba Cloud Linux 3

**Prerequisites**:
- Alibaba Cloud Linux 3 operating system installed
- Root or sudo privileges
- Active network connection to access YUM repositories

1. Connect to your Alibaba Cloud Linux 3 ECS instance via SSH or the **Cloud Assistant** (link) in the ECS console.
   - Element: **Connect** (button) — located in the instance details page under "Actions"
   - Notes: Use SSH client or browser-based terminal

2. In the terminal, install Python 3.8 by running the following command:
   - Element: `yum install python38 -y` (text_input)
   - Location: Terminal command line

3. Install Python 3.10 by running:
   - Element: `yum install python3.10 -y` (text_input)

4. Install Python 3.11 by running:
   - Element: `yum install python3.11 -y` (text_input)

5. Install Python 3.12 by running:
   - Element: `yum install python3.12 -y` (text_input)

6. Verify the installation of Python 3.11:
   - Element: `python3.11 --version` (text_input)
   - Notes: Should return "Python 3.11.x"

7. Create a virtual environment using Python 3.11:
   - Element: `python3.11 -m venv ~/venv/python311` (text_input)

8. Activate the virtual environment:
   - Element: `source ~/venv/python311/bin/activate` (text_input)
   - Notes: Prompt changes to `(python311)` upon activation

9. Confirm the active Python version inside the virtual environment:
   - Element: `python --version` (text_input)
   - Notes: Must output "Python 3.11.x"

10. Deactivate the virtual environment when done:
    - Element: `deactivate` (text_input)
    - Notes: Returns to system default Python (typically 3.6)

**Form Fields**: None (command-line only)

### Upgrade curl Version

**Navigation**: N/A — performed entirely in terminal after connecting to ECS instance

**Prerequisites**:
- Remote connection established to an Alibaba Cloud Linux 2 ECS instance

1. Connect to your Alibaba Cloud Linux 2 ECS instance via SSH or **Cloud Assistant**.
   - Element: **Connect** (button) — in ECS instance actions menu
   - Notes: Refer to ECS documentation for connection methods

2. Install the Alibaba Cloud experimental repository:
   - Element: `sudo yum install -y alinux-release-experimentals` (text_input)
   - Location: Terminal

3. Install the high-version curl package:
   - Element: `sudo yum install -y httpd24-curl` (text_input)
   - Notes: This installs curl-7.61.1 in `/opt/rh/httpd24/root/usr/bin/`

4. (Optional) Install development headers if needed:
   - Element: `sudo yum install -y httpd24-libcurl-devel` (text_input)

5. Enable the new curl version in the current shell session:
   - Element: `source /opt/rh/httpd24/enable` (text_input)
   - Notes: This modifies PATH and LD_LIBRARY_PATH temporarily

6. Verify the active curl version:
   - Element: `curl --version` (text_input)
   - Notes: Should display "curl 7.61.1"; the system default curl remains unchanged

**Form Fields**: None (command-line only)

### Install Alibaba Cloud Compiler

**Navigation**: N/A — performed in terminal after accessing Alibaba Cloud Linux 3 instance

**Prerequisites**:
- ECS instance running Alibaba Cloud Linux 3
- Only supported on Alibaba Cloud Linux 3 (not available on other OS versions)

1. Connect to your Alibaba Cloud Linux 3 ECS instance.

2. Install the Alibaba Cloud Compiler and required dependencies:
   - Element: `sudo yum install -y alinux-compiler` (text_input)
   - Notes: Installs Clang/LLVM-13 based compiler with C++20 support

3. Install the standard library development package:
   - Element: `sudo yum install -y libstdc++-devel` (text_input)

4. Install the yaLanTingLibs utility library (optional but recommended):
   - Element: `sudo yum install -y yalandting-libs-devel` (text_input)

5. Verify compiler installation:
   - Element: `clang++ --version` (text_input)
   - Notes: Should show version based on LLVM 13

6. Compile a C++20 module example (if testing):
   - Element: `clang++ -std=c++20 -fmodules -x c++-system-header iostream` (text_input)
   - Notes: Demonstrates C++20 Modules support

**Form Fields**: None (command-line only)

## FAQ

Q: Can I change the system default Python version by installing a newer one?
A: No. Alibaba Cloud Linux uses Python 3.6 as the system default for stability. Installing newer versions (3.8–3.12) does not replace the default. Use virtual environments (`venv`) to safely use newer versions without affecting system tools.

Q: Why can't I upgrade the system curl directly on Alibaba Cloud Linux 2?
A: Due to strict ABI compatibility requirements, the default curl cannot be upgraded. Instead, a parallel version (curl-7.61.1) is provided via the `httpd24-curl` package in the experimental repository, which must be explicitly enabled per session.

Q: Is the Alibaba Cloud Compiler available on Alibaba Cloud Linux 2?
A: No. The Alibaba Cloud Compiler is only supported on Alibaba Cloud Linux 3. Attempting to install it on other versions will fail.

Q: Do I need to re-enable curl or Python every time I log in?
A: Yes. The `source /opt/rh/httpd24/enable` command only affects the current shell session. To make it persistent, add it to your shell profile (e.g., `~/.bashrc`). Similarly, virtual environments must be activated manually each session.

Q: Are these software installations billed separately?
A: No. All packages described—Python versions, curl-7.61.1, and Alibaba Cloud Compiler—are provided free of charge through the YUM repositories. There are no additional fees beyond standard ECS instance costs.

## Pricing & Billing

### Billing Model
All software management operations described in this guide are **free of charge**. Packages are distributed via official Alibaba Cloud YUM repositories at no additional cost.

### Free Tier
All users with access to Alibaba Cloud Linux instances can install these packages without quota restrictions, subject only to standard system resource limits.

### Billing Notes
These operations do not incur any direct charges. However, increased resource usage (CPU, memory, disk) from running applications built with these tools may affect overall ECS billing.