Nóta
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað aðskrá þig inn eða breyta skráasöfnum.
Aðgangur að þessari síðu krefst heimildar. Þú getur prófað að breyta skráasöfnum.
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.
Tip
SQL Server 2025 (17.x) is available on RHEL 10 (in preview) and Ubuntu 24.04 (in preview). To try it, use this article to configure the mssql-server-preview repository. Then install using the instructions in the installation guide.
Repositories
When you install SQL Server on Linux, you must configure a Microsoft repository. This repository is used to acquire the database engine package, mssql-server, and related SQL Server packages. There are currently three main repositories:
| Repository | Name | Description |
|---|---|---|
| 2025 | mssql-server-2025 1 |
SQL Server 2025 (17.x) repository. |
| 2022 | mssql-server-2022 |
SQL Server 2022 (16.x) repository. |
| 2019 | mssql-server-2019 |
SQL Server 2019 (15.x) Cumulative Update (CU) repository. |
| 2017 | mssql-server-2017 |
SQL Server 2017 (14.x) Cumulative Update (CU) repository. |
1 Use mssql-server-preview for Red Hat 10 (in preview) and Ubuntu 24.04 (in preview).
The Cumulative Update (CU) 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 CU 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 have already registered a SQL Server repository.
View the files in the
/etc/yum.repos.ddirectory with the following command:sudo ls /etc/yum.repos.dLook for a file that configures the SQL Server directory, such as
mssql-server.repo.Display the contents of the file using
cat.sudo cat /etc/yum.repos.d/mssql-server.repoThe name property is the configured repository. You can identify it with the table in the Repositories section of this article.
Remove old repository
If necessary, remove the old repository with the following command.
sudo rm -rf /etc/yum.repos.d/mssql-server.repo
This command assumes that the file identified in the previous section was named mssql-server.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.
- Starting with SQL Server 2025 (17.x), RHEL 10 is supported (in preview).
- Starting with SQL Server 2022 (16.x) CU 10, RHEL 9 is supported.
- Starting with SQL Server 2017 (14.x) CU 20, RHEL 8 is supported.
The following commands for SQL Server 2019 (15.x) point to the RHEL 8 repository. RHEL 8 doesn't come preinstalled with python2, which SQL Server requires. For more information, see Installing Microsoft SQL Server on Red Hat Enterprise Linux 8 Beta.
Depending on the version of RHEL you use, ensure the paths match /rhel/8, /rhel/9, or /rhel10. Our packages are agnostic to RHEL minor versions. This means that if you use RHEL 8.7, you need to use the path /rhel/8 to configure your repository.
| Repository | Version | Release | Command |
|---|---|---|---|
| 2025 | 2025 | RHEL 10 (in preview) | sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/10/mssql-server-preview.repo |
| 2022 | 2022 | RHEL 9 | sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/9/mssql-server-2022.repo |
| 2019 CU | 2019 | RHEL 8 | sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo |
| 2017 CU | 2017 | RHEL 8 | sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2017.repo |
If you choose to use a quickstart article, remember that you have already configured the target repository. Don't repeat that step in the tutorial.