Install SQL Server on Debian

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.


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.


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