[GH-ISSUE #14971] feat: Add TencentOS Server to supported Linux distributions in install script #56138

Open
opened 2026-04-29 10:18:42 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @guoningzhang20 on GitHub (Mar 20, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/14971

Description

Ollama's install script does not recognize TencentOS Server when setting up the systemd service. The issue is that TencentOS's /etc/os-release has ID_LIKE="tencentos" instead of including RHEL family identifiers like "rhel centos fedora", causing the installer's Linux distribution detection to fail.

Environment

  • OS: TencentOS Server V4.4
  • /etc/os-release (key fields):
    NAME="TencentOS Server"
    VERSION="4.4"
    ID=tencentos
    ID_LIKE="tencentos"
    VERSION_ID="4.4"
    PLATFORM_ID="platform:el9"
    
  • Arch: x86_64
  • Init system: systemd
  • Package Manager: dnf

Steps to Reproduce

# On a fresh TencentOS Server V4.4 instance:
curl -fsSL https://ollama.com/install.sh | sh

The install script downloads the Ollama binary successfully but fails when attempting to register the systemd service, because the OS detection logic does not recognize tencentos as a valid distribution.

Expected Behavior

Ollama should recognize TencentOS Server as a RHEL-family distribution and complete the full installation including systemd service registration.

Actual Behavior

The systemd service setup step fails because the install script's distribution detection does not handle ID=tencentos or ID_LIKE="tencentos".

Workaround

After the script fails, manually create the systemd service:

# The binary is already installed, just need to set up the service manually
cat > /etc/systemd/system/ollama.service << 'EOF'
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
Restart=always
RestartSec=3
Environment="HOME=/root"

[Install]
WantedBy=default.target
EOF

systemctl daemon-reload
systemctl enable --now ollama

Suggested Fix

Add tencentos to the distribution detection logic in the install script:

case "$ID" in
    centos|rhel|fedora|rocky|alma|tencentos)
        # RHEL-family handling
        ;;
esac

Or use PLATFORM_ID as a more robust fallback:

if [[ "$PLATFORM_ID" == platform:el* ]]; then
    # EL-compatible distribution, proceed with RHEL handling
fi

Additional Context

  • TencentOS Server is a Linux distribution maintained by Tencent Cloud, based on the RHEL/CentOS ecosystem (EL9)
  • It serves millions of cloud instances on Tencent Cloud
  • Uses dnf package manager, supports RPM packages, runs systemd
  • Official site: https://cloud.tencent.com/product/ts
  • This issue was discovered during automated AI usability testing across Linux distributions
Originally created by @guoningzhang20 on GitHub (Mar 20, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/14971 ## Description Ollama's install script does not recognize **TencentOS Server** when setting up the systemd service. The issue is that TencentOS's `/etc/os-release` has `ID_LIKE="tencentos"` instead of including RHEL family identifiers like `"rhel centos fedora"`, causing the installer's Linux distribution detection to fail. ## Environment - **OS**: TencentOS Server V4.4 - **`/etc/os-release`** (key fields): ``` NAME="TencentOS Server" VERSION="4.4" ID=tencentos ID_LIKE="tencentos" VERSION_ID="4.4" PLATFORM_ID="platform:el9" ``` - **Arch**: x86_64 - **Init system**: systemd - **Package Manager**: dnf ## Steps to Reproduce ```bash # On a fresh TencentOS Server V4.4 instance: curl -fsSL https://ollama.com/install.sh | sh ``` The install script downloads the Ollama binary successfully but fails when attempting to register the systemd service, because the OS detection logic does not recognize `tencentos` as a valid distribution. ## Expected Behavior Ollama should recognize TencentOS Server as a RHEL-family distribution and complete the full installation including systemd service registration. ## Actual Behavior The systemd service setup step fails because the install script's distribution detection does not handle `ID=tencentos` or `ID_LIKE="tencentos"`. ### Workaround After the script fails, manually create the systemd service: ```bash # The binary is already installed, just need to set up the service manually cat > /etc/systemd/system/ollama.service << 'EOF' [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/local/bin/ollama serve Restart=always RestartSec=3 Environment="HOME=/root" [Install] WantedBy=default.target EOF systemctl daemon-reload systemctl enable --now ollama ``` ## Suggested Fix Add `tencentos` to the distribution detection logic in the install script: ```bash case "$ID" in centos|rhel|fedora|rocky|alma|tencentos) # RHEL-family handling ;; esac ``` Or use `PLATFORM_ID` as a more robust fallback: ```bash if [[ "$PLATFORM_ID" == platform:el* ]]; then # EL-compatible distribution, proceed with RHEL handling fi ``` ## Additional Context - **TencentOS Server** is a Linux distribution maintained by Tencent Cloud, based on the RHEL/CentOS ecosystem (EL9) - It serves millions of cloud instances on Tencent Cloud - Uses `dnf` package manager, supports RPM packages, runs systemd - Official site: https://cloud.tencent.com/product/ts - This issue was discovered during automated AI usability testing across Linux distributions
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#56138