title | titleSuffix | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | ms.custom | monikerRange |
---|---|---|---|---|---|---|---|---|---|---|---|
Install PolyBase on Linux |
SQL Server |
Learn how to install SQL Server PolyBase on Linux. PolyBase enables you to run external queries against remote data sources. |
MikeRayMSFT |
mikeray |
dakryze, randolphwest |
12/29/2023 |
sql |
linux |
install-set-up-deploy |
intro-installation, linux-related-content |
>=sql-server-linux-ver15 || >=sql-server-ver15 |
[!INCLUDE sqlserver2019-linux]
The following steps install PolyBase (mssql-server-polybase
and mssql-server-polybase-hadoop
) on Linux. PolyBase enables you to run external queries against remote data sources.
Before you install PolyBase, first install SQL Server. This step configures the keys and repositories that you use when installing the mssql-server-polybase
and mssql-server-polybase-hadoop
package.
The length of the hostname where [!INCLUDE ssnoversion-md] is installed needs to be 15 characters or less.
PolyBase isn't supported on [!INCLUDE sssql17-md] for Linux.
Scale-out for PolyBase on Linux is currently unavailable.
Hadoop is no longer supported on [!INCLUDE sssql22-md].
Install PolyBase for your operating system:
- Red Hat Enterprise Linux (RHEL)
- Ubuntu
- SUSE Linux Enterprise Server (SLES)
Applies to: [!INCLUDE sssql19-md] and later versions
-
Download the Microsoft Red Hat repository configuration file.
For RHEL 7:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
For RHEL 8:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/8/prod.repo
For RHEL 9:
sudo curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/9/prod.repo
-
Use the following command to install the
mssql-server-polybase
on Red Hat Enterprise Linux.sudo yum install -y mssql-server-polybase
-
You're prompted to restart the [!INCLUDE ssnoversion-md] instance. Use the following command to do so.
sudo systemctl restart mssql-server
Note
After installation, you must enable the PolyBase feature.
Applies to: [!INCLUDE sssql19-md]
-
Use the following command to install the
mssql-server-polybase-hadoop
.sudo yum install -y mssql-server-polybase-hadoop
The PolyBase Hadoop package has dependencies on the following packages:
mssql-server
mssql-server-polybase
mssql-server-extensibility
mssql-zulu-jre-11
-
Installation prompts to restart
launchpadd
. Use the following command to do so.sudo systemctl restart mssql-launchpadd
Note
After installation, you must set the Hadoop connectivity level.
If you need an offline installation, locate the PolyBase package download in the Release notes for SQL Server 2019 on Linux. Then use the same offline installation steps described in the article Install SQL Server.
Applies to: [!INCLUDE sssql19-md] and later versions
-
Register the Microsoft Ubuntu repository.
For Ubuntu 16.04:
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
For Ubuntu 18.04:
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
For Ubuntu 20.04:
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
For Ubuntu 22.04:
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
-
Use the following command to install the
mssql-server-polybase
on Ubuntu.sudo apt-get install mssql-server-polybase
-
When prompted, restart the [!INCLUDE ssnoversion-md] instance.
sudo systemctl restart mssql-server
Note
After installation, you must enable the PolyBase feature.
If you need an offline installation, locate the PolyBase package download in the Release notes for SQL Server 2019 on Linux. Then use the same offline installation steps described in the article Install SQL Server.
Applies to: [!INCLUDE sssql19-md]
-
Use the following command to install the
mssql-server-polybase-hadoop
.sudo apt-get install mssql-server-polybase-hadoop
The PolyBase Hadoop package has dependencies on the following packages:
mssql-server
mssql-server-polybase
mssql-server-extensibility
mssql-zulu-jre-11
-
Installation prompts to restart
launchpadd
. Use the following command to do so.sudo systemctl restart mssql-launchpadd
Note
After installation, you must set the Hadoop connectivity level. This step only applies to [!INCLUDE sssql19-md].
Applies to: [!INCLUDE sssql19-md] and later versions
-
Add the Microsoft [!INCLUDE ssnoversion-md] repository to Zypper.
For SLES 12:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/prod.repo sudo zypper --gpg-auto-import-keys refresh
For SLES 15:
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/prod.repo sudo zypper --gpg-auto-import-keys refresh
-
Use the following commands to install the
mssql-server-polybase
on SUSE Linux Enterprise Server.sudo zypper install mssql-server-polybase
-
You're prompted to restart the [!INCLUDE ssnoversion-md] instance. Use the following command to do so.
sudo systemctl restart mssql-server
Note
After installation, you must enable the PolyBase feature.
If you need an offline installation, locate the PolyBase package download in the Release notes for SQL Server 2019 on Linux. Then use the same offline installation steps described in the article Install SQL Server.
After installation, PolyBase must be enabled to access its features. Connect to the installed [!INCLUDE ssnoversion-md] instance and use the following Transact-SQL command to enable.
exec sp_configure @configname = 'polybase enabled', @configvalue = 1;
RECONFIGURE WITH OVERRIDE;
If you already have mssql-server-polybase
installed, you can update to the latest version with the following commands:
Applies to: [!INCLUDE sssql19-md]
sudo yum remove -y mssql-server-polybase-hadoop
sudo yum remove -y mssql-server-polybase
sudo yum check-update
sudo yum install -y mssql-server-polybase
sudo yum install -y mssql-server-polybase-hadoop
sudo yum remove -y mssql-server-polybase
sudo yum check-update
sudo yum install -y mssql-server-polybase
You're prompted to restart the [!INCLUDE ssnoversion-md] instance. Use the following command to do so.
sudo systemctl restart mssql-server
Applies to: [!INCLUDE sssql19-md].
sudo apt-get remove mssql-server-polybase-hadoop
sudo apt-get remove mssql-server-polybase
sudo apt-get update
sudo apt-get install mssql-server-polybase
sudo apt-get install mssql-server-polybase-hadoop
sudo apt-get remove mssql-server-polybase
sudo apt-get update
sudo apt-get install mssql-server-polybase
You're prompted to restart the [!INCLUDE ssnoversion-md] instance. Use the following command to do so.
sudo systemctl restart mssql-server
sudo zypper remove mssql-server-polybase
sudo zypper refresh
sudo zypper install mssql-server-polybase
You're prompted to restart the [!INCLUDE ssnoversion-md] instance. Use the following command to do so.
sudo systemctl restart mssql-server
Note
After installation, you must enable the PolyBase feature.
PolyBase on Linux can access the following data sources. Follow the provided links for more information on how to create an external table from these sources on PolyBase is enabled.