7

I want to install SQL Server on Linux. From MS site I read that Red Hat, SUSE, and Ubuntu are supported but I want to use it under Debian. Since Ubuntu is based on Debian, is there a chance to succeed with installation?

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup

10

This worked for me on Debian 8 (Jessie) when I installed the pre-2017 vNext for dbfiddle:

  1. apt-get install curl apt-transport-https sudo
  2. add deb http://ftp.debian.org/debian jessie-backports main to /etc/apt/sources.list
  3. apt-get update && apt-get install -t jessie-backports openssl ca-certificates
  4. curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
  5. curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
  6. apt-get update && apt-get install mssql-server
  7. sudo /opt/mssql/bin/mssql-conf setup

However I tried and failed to get the RTM Linux version of 2017 installed on Debian Stretch, ultimately using Ubuntu.

  • 1
    The server list name was changed. It is now packages.microsoft.com/config/ubuntu/16.04/… – galmeida Jan 8 at 20:28
  • 2
    Another problem I came across was the missing libssl1.0.0 package in debian 9. This solved it: unix.stackexchange.com/questions/394456/… – galmeida Jan 8 at 21:03
  • Using this path, SQL Server was apparently installed but I couldn't connect to it no matter what. I got errors "Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749." and "Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.Error code 0x102" and couldn't fix them (I've tried many things). I decided to use docker instead, and it worked (apparently). docs.microsoft.com/en-us/sql/linux/… – galmeida Jan 12 at 23:16
  • @galmeida Debian 8 or 9? – Jack Douglas Jan 14 at 10:11
  • It's Debian 9.. – galmeida Jan 14 at 22:34
6

Yes, there is a chance the installation will succeed, or that you can work around any issues. It wouldn't be a supported configuration, but it might work.

You also can try the docker image.

3

apt:

$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list

Update apt package database and install mssql-server package:

$ sudo apt-get update
$ sudo apt-get install mssql-server

After package installation, you need to run:

$ /opt/mssql/bin/sqlservr-setup script:
$ sudo /opt/mssql/bin/sqlservr-setup

Microsoft(R) SQL Server(R) Setup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.