Muokkaa

Configure repositories for installing and upgrading SQL Server 2025 on Linux

Applies to: SQL Server on Linux

This article describes how to configure the correct repository for installing and upgrading SQL Server 2025 (17.x) on Red Hat Enterprise Linux (RHEL) and Ubuntu.

For instructions on how to configure repositories for SQL Server 2022 (16.x) and earlier versions, see Configure Repositories for Installing and Upgrading SQL Server on Linux.

Distribution support

  • RHEL 10 is supported starting with SQL Server 2025 (17.x) CU 1.
  • Ubuntu 24.04 is supported starting with SQL Server 2025 (17.x) CU 1.
  • Ubuntu 22.04 is supported starting with SQL Server 2022 (16.x) CU 10.

For more information, see the installation guide.

Repositories

When you install SQL Server on Linux, you must configure a Microsoft repository. Use this repository to get the database engine package, mssql-server, and related SQL Server packages. The following repositories are currently available:

Repository Name Description
2025 mssql-server-2025 SQL Server 2025 (17.x) repository.

The repository contains packages for the base SQL Server release, and any bug fixes or improvements since that release. Cumulative updates are specific to a release version, such as SQL Server 2025 (17.x). They're released on a regular cadence. General distribution release (GDR) updates are released in the same repository.

Each release contains the full SQL Server package and all previous updates for that repository. You can also downgrade to any release within your major version (for example, 2025).

Configure repositories

Use the steps in the following sections to configure repositories on your Linux distribution.

Check for previously configured repositories

First, verify whether you already registered a SQL Server repository.

  1. View the files in the /etc/yum.repos.d directory using the following command:

    sudo ls /etc/yum.repos.d
    
  2. Look for a file that configures the SQL Server repository, such as mssql-server-2025.repo.

  3. Display the contents of the file using cat.

    sudo cat /etc/yum.repos.d/mssql-server-2025.repo
    
  4. The repository name in the baseurl property, such as mssql-server-2025, is the configured repository. You can identify it using the table in the Repositories section of this article.

Remove old repository

If necessary, remove the old repository using the following command.

sudo rm -rf /etc/yum.repos.d/mssql-server-2025.repo

This command assumes that the file identified in the previous section is named mssql-server-2025.repo.

Configure new repository

Configure the new repository to use for SQL Server installations and upgrades. Use one of the following commands to configure the repository of your choice.

RHEL 10 is supported starting with SQL Server 2025 (17.x) CU 1.

The packages are agnostic to RHEL minor versions. For example, if you use RHEL 10.1, use the path /rhel/10 to configure your repository.

curl -fsSL https://packages.microsoft.com/config/rhel/10/mssql-server-2025.repo | sudo tee /etc/yum.repos.d/mssql-server-2025.repo

If you choose to use a quickstart article, remember that you already configured the target repository. Don't repeat that step in the tutorial.