title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | ms.custom | ||
---|---|---|---|---|---|---|---|---|---|---|
SUSE: Install SQL Server on Linux |
This quickstart shows how to install SQL Server on SUSE Linux Enterprise Server and then create and query a database with sqlcmd. |
rwestMSFT |
randolphwest |
03/28/2025 |
sql |
linux |
quickstart |
|
[!INCLUDE SQL Server - Linux]
::: moniker range="=sql-server-linux-2017 || =sql-server-2017"
In this quickstart, you install [!INCLUDE sssql17-md] on SUSE Linux Enterprise Server (SLES) v12. Then you can connect with sqlcmd to create your first database and run queries.
For more information on supported platforms, see Release notes for SQL Server 2017 on Linux.
::: moniker-end
::: moniker range=">=sql-server-linux-ver15 || >=sql-server-ver15"
In this quickstart, you install [!INCLUDE sssql19-md] on SUSE Linux Enterprise Server (SLES) 15. Then you can connect with sqlcmd to create your first database and run queries.
For more information on supported platforms, see Release notes for SQL Server 2019 on Linux.
::: moniker-end
::: moniker range=">= sql-server-linux-ver16 || >= sql-server-ver16"
In this quickstart, you install [!INCLUDE sssql22-md] on SUSE Linux Enterprise Server (SLES) 15. Then you can connect with sqlcmd to create your first database and run queries.
For more information on supported platforms, see Release notes for SQL Server 2022 on Linux.
::: moniker-end
Tip
This tutorial requires user input and an internet connection. If you're interested in the unattended or offline installation procedures, see Installation guidance for SQL Server on Linux.
::: moniker range="=sql-server-linux-2017 || =sql-server-2017"
You must have a SLES v12 SP5 machine with at least 2 GB of memory. The file system must be XFS or EXT4. Other file systems, such as BTRFS, are unsupported.
::: moniker-end
::: moniker range="=sql-server-linux-ver15 || =sql-server-ver15"
You must have a SLES 15 (SP6) machine with at least 2 GB of memory. The file system must be XFS or EXT4. Other file systems, such as BTRFS, are unsupported.
::: moniker-end
::: moniker range=">= sql-server-linux-ver16 || >= sql-server-ver16"
You must have a SLES 15 (SP6) machine with at least 2 GB of memory. The file system must be XFS or EXT4. Other file systems, such as BTRFS, are unsupported.
::: moniker-end
To install SUSE Linux Enterprise Server on your own machine, go to https://www.suse.com/products/server. You can also use ready-made SUSE images from Azure Marketplace. For how to use these images in Azure, check out Create and Manage Linux VMs with the Azure CLI and use --image SLES
in the call to az vm create
.
For more information about support periods for SUSE versions, see https://www.suse.com/lifecycle.
If you previously installed a community technology preview (CTP) or release candidate (RC) of [!INCLUDE ssnoversion-md], you must first remove the old repository before following these steps. For more information, see Configure repositories for installing and upgrading SQL Server on Linux.
Note
At this time, the Windows Subsystem for Linux for Windows 10 or Windows 11 isn't supported as an installation target.
For other system requirements, see System requirements for SQL Server on Linux.
To configure [!INCLUDE ssnoversion-md] on SLES, run the following commands in a terminal to install the mssql-server package:
::: moniker range="=sql-server-linux-2017 || =sql-server-2017"
-
Download the [!INCLUDE sssql17-md] SLES repository configuration file:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/mssql-server-2017.repo
[!TIP]
If you want to install a different version of [!INCLUDE ssnoversion-md], see the [[!INCLUDE sssql19-md]](quickstart-install-connect-suse.md?view=sql-server-linux-ver15&preserve-view=true#install) or [[!INCLUDE sssql22-md]](quickstart-install-connect-suse.md?view=sql-server-linux-ver16&preserve-view=true#install) version of this article. -
Refresh your repositories.
sudo zypper --gpg-auto-import-keys refresh
To ensure that the Microsoft package signing key is installed on your system, you can import it using the following command:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Before you install [!INCLUDE ssnoversion-md], and after you register and activate your SUSE Linux Enterprise Server with SUSE Customer Center, you must activate both the Desktop Applications module and Development Tools module. These modules are required for some of the [!INCLUDE ssnoversion-md] package dependencies.
-
Now, you're ready to install [!INCLUDE ssnoversion-md]. Run the following commands to install [!INCLUDE ssnoversion-md]:
sudo zypper install -y mssql-server
-
After the package installation finishes, run
mssql-conf setup
and follow the prompts to set thesa
password and choose your edition. As a reminder, the following [!INCLUDE ssnoversion-md] editions are freely licensed: Evaluation, Developer, and Express.sudo /opt/mssql/bin/mssql-conf setup
[!CAUTION]
[!INCLUDE password-complexity] -
Once the configuration is done, verify that the service is running:
systemctl status mssql-server
-
If you plan to connect remotely, you might also need to open the [!INCLUDE ssnoversion-md] TCP port (default 1433) on your firewall. If you're using the SUSE firewall, you need to edit the
/etc/sysconfig/SuSEfirewall2
configuration file. Modify theFW_SERVICES_EXT_TCP
entry to include the [!INCLUDE ssnoversion-md] port number.FW_SERVICES_EXT_TCP="1433"
At this point, [!INCLUDE ssnoversion-md] is running on your SLES machine and is ready to use.
::: moniker-end
::: moniker range="=sql-server-linux-ver15 || =sql-server-ver15"
-
Download the [!INCLUDE sssql19-md] SLES repository configuration file:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/mssql-server-2019.repo
[!TIP]
If you want to install a different version of [!INCLUDE ssnoversion-md], see the [[!INCLUDE sssql17-md]](quickstart-install-connect-suse.md?view=sql-server-linux-2017&preserve-view=true#install) or [[!INCLUDE sssql22-md]](quickstart-install-connect-suse.md?view=sql-server-linux-ver16&preserve-view=true#install) version of this article. -
Refresh your repositories.
sudo zypper --gpg-auto-import-keys refresh
To ensure that the Microsoft package signing key is installed on your system, you can import it using the following command:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Before you install [!INCLUDE ssnoversion-md], and after you register and activate your SUSE Linux Enterprise Server with SUSE Customer Center, you must activate both the Desktop Applications module and Development Tools module. These modules are required for some of the [!INCLUDE ssnoversion-md] package dependencies.
-
Now, you're ready to install [!INCLUDE ssnoversion-md]. Run the following commands to install [!INCLUDE ssnoversion-md]:
sudo zypper install -y mssql-server
-
After the package installation finishes, run
mssql-conf setup
and follow the prompts to set thesa
password and choose your edition. As a reminder, the following [!INCLUDE ssnoversion-md] editions are freely licensed: Evaluation, Developer, and Express.sudo /opt/mssql/bin/mssql-conf setup
[!CAUTION]
[!INCLUDE password-complexity] -
Once the configuration is done, verify that the service is running:
systemctl status mssql-server
-
If you plan to connect remotely, you might need to open the [!INCLUDE ssnoversion-md] TCP port (default 1433) on your firewall.
[!NOTE]
On SLES, you can manage your firewall usingfirewalld
for example. Install it usingsudo zypper install firewalld
, and then start it up withsudo systemctl start firewalld
. Add the firewall rule withsudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
, and then reload the firewall withsudo firewall-cmd --reload
for the settings to take effect.
At this point, [!INCLUDE ssnoversion-md] is running on your SLES machine and is ready to use.
::: moniker-end
::: moniker range=">= sql-server-linux-ver16 || >= sql-server-ver16"
-
Download the [!INCLUDE sssql22-md] SLES repository configuration file:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/mssql-server-2022.repo
[!TIP]
If you want to install a different version of [!INCLUDE ssnoversion-md], see the [[!INCLUDE sssql17-md]](quickstart-install-connect-suse.md?view=sql-server-linux-2017&preserve-view=true#install) or [[!INCLUDE sssql19-md]](quickstart-install-connect-suse.md?view=sql-server-linux-ver15&preserve-view=true#install) version of this article. -
Refresh your repositories.
sudo zypper --gpg-auto-import-keys refresh
To ensure that the Microsoft package signing key is installed on your system, you can import it using the following command:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
-
Before you install [!INCLUDE ssnoversion-md], and after you register and activate your SUSE Linux Enterprise Server with SUSE Customer Center, you must activate both the Desktop Applications module and Development Tools module. These modules are required for some of the [!INCLUDE ssnoversion-md] package dependencies.
-
The following command installs [!INCLUDE ssnoversion-md]:
sudo zypper install -y mssql-server
-
After the package installation finishes, run
mssql-conf setup
and follow the prompts to set thesa
password and choose your edition. As a reminder, the following [!INCLUDE ssnoversion-md] editions are freely licensed: Evaluation, Developer, and Express.sudo /opt/mssql/bin/mssql-conf setup
[!CAUTION]
[!INCLUDE password-complexity] -
Once the configuration is done, verify that the service is running:
systemctl status mssql-server
-
If you plan to connect remotely, you might need to open the [!INCLUDE ssnoversion-md] TCP port (default 1433) on your firewall.
[!NOTE]
On SLES, you can manage your firewall usingfirewalld
for example. Install it usingsudo zypper install firewalld
, and then start it up withsudo systemctl start firewalld
. Add the firewall rule withsudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
, and then reload the firewall withsudo firewall-cmd --reload
for the settings to take effect.
At this point, [!INCLUDE ssnoversion-md] is running on your SLES machine and is ready to use.
::: moniker-end
[!INCLUDE connect-with-sa]
To create a database, you need to connect with a tool that can run Transact-SQL statements on [!INCLUDE ssnoversion-md]. The following steps install the [!INCLUDE ssnoversion-md] command-line tools: sqlcmd utility and bcp utility.
[!INCLUDE odbc-sles]
[!INCLUDE Connect, create, and query data]