How to Install SQL Server on Debian

debianinstallationsql server

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

Best Answer

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.