Skip to content

Latest commit

 

History

History
256 lines (164 loc) · 14.1 KB

quickstart-install-connect-suse.md

File metadata and controls

256 lines (164 loc) · 14.1 KB
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
10/24/2023
sql
linux
conceptual
intro-installation
linux-related-content

Quickstart: Install SQL Server and create a database on SUSE Linux Enterprise Server

[!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) v15 (SP3). 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) v15 (SP3). 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.

Prerequisites

::: 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 v15 (SP1 - SP4) 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 v15 (SP1 - SP4) 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 create SLES virtual machines in Azure. See Create and Manage Linux VMs with the Azure CLI, and use --image SLES in the call to az vm create.

If you've 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.

Install SQL Server

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"

  1. 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.

  2. 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 command below:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  3. Before you install [!INCLUDE ssnoversion-md], and after you have registered and activated 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.

  4. Now, you're ready to install [!INCLUDE ssnoversion-md]. Run the following commands to install [!INCLUDE ssnoversion-md]:

    sudo zypper install -y mssql-server
  5. After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA 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

    Remember to specify a strong password for the SA account. You need a minimum length 8 characters, including uppercase and lowercase letters, base-10 digits and/or non-alphanumeric symbols.

  6. Once the configuration is done, verify that the service is running:

    systemctl status mssql-server
  7. 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 the FW_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"

  1. 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.

  2. 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 command below:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  3. Before you install [!INCLUDE ssnoversion-md], and after you have registered and activated 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.

  4. Now, you're ready to install [!INCLUDE ssnoversion-md]. Run the following commands to install [!INCLUDE ssnoversion-md]:

    sudo zypper install -y mssql-server
  5. After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA 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

    Remember to specify a strong password for the SA account. You need a minimum length 8 characters, including uppercase and lowercase letters, base-10 digits and/or non-alphanumeric symbols.

  6. Once the configuration is done, verify that the service is running:

    systemctl status mssql-server
  7. 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 using firewalld for example. Install it using sudo zypper install firewalld, and then start it up with sudo systemctl start firewalld. Add the firewall rule with sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent, and then reload the firewall with sudo 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"

  1. 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.

  2. 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 command below:

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
  3. Before you install [!INCLUDE ssnoversion-md], and after you have registered and activated 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.

  4. Now, you're ready to install [!INCLUDE ssnoversion-md]. Run the following commands to install [!INCLUDE ssnoversion-md]:

    sudo zypper install -y mssql-server
  5. After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA 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

    Remember to specify a strong password for the SA account. You need a minimum length 8 characters, including uppercase and lowercase letters, base-10 digits and/or non-alphanumeric symbols.

  6. Once the configuration is done, verify that the service is running:

    systemctl status mssql-server
  7. 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 using firewalld for example. Install it using sudo zypper install firewalld, and then start it up with sudo systemctl start firewalld. Add the firewall rule with sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent, and then reload the firewall with sudo 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

Disable the sa account as a best practice

[!INCLUDE connect-with-sa]

Install the SQL Server command-line tools

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]