Microsoft SQL Server 2017 on Debian 9
- Databases and storage
- Published
- 2 min read
- @nabbisen
Table of contents
Introduction Introduction
Microsoft (opens in a new tab) SQL Server (opens in a new tab) is one of relational database management systems aka RDBMS. It is available on Linux (opens in a new tab) since SQL Server 2017 with both installation and Docker (opens in a new tab) image. This post shows how to install it on Debian (opens in a new tab) 9 “stretch (opens in a new tab)” (with VirtualBox (opens in a new tab)).
Tutorial Tutorial
This post is based on the official guidance (opens in a new tab).
Requirements Requirements
2GB RAM is absolutely required in order to run setup script after installing the package. The others are here (opens in a new tab).
Preparation Preparation
sudo (opens in a new tab) command is also necessary in running setup script.
Therefore, install it and set it up:
# apt-get install sudo
# visudo
Install other packages necessary as preparation.
$ sudo apt-get install curl
Add dependencies of mssql-server.
First, Install the security package:
$ sudo apt-get install apt-transport-https
Next, install older libssl (opens in a new tab).
Edit /etc/apt/sources.list to add a line to the bottom like this:
+ deb http://ftp.debian.org/debian jessie main
Then install it:
$ sudo apt-get update
$ sudo apt-get install libssl1.0
Moreover, for the sake of apt-key add microsoft.asc:
$ sudo apt-get install gnupg
Installation Installation
Here we’re ready. Let’s add the repository:
$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/mssql-server.list
Then install it:
$ sudo apt-get update
$ sudo apt-get install mssql-server
Run the setup script:
$ sudo /opt/mssql/bin/mssql-conf setup
You can follow the installer. “Express” edition is free to use with limitations (opens in a new tab).
Finally, restart the service:
$ sudo systemctl restart mssql-server.service
Conclusion Conclusion
The official guidance shows quickstarts of RHEL 7.3~ (opens in a new tab) / Suse Linux (opens in a new tab) / Ubuntu 16.04 (opens in a new tab). The tutorial of this post is a subspecies of Ubuntu (opens in a new tab)’s. As I wrote in Introducion, Docker image is also available (opens in a new tab).
In my early days as an engineer, I didn’t imagine SQL Server would become free to use on Linux even with some limitations…🙂
Thank you for your reading. Happy computing.
More on: Run a database on your server
-
MariaDB is one of the most popular relational database management systems (RDBMS), forked from MySQL by some of the original developers.
-
OpenBSD gives us good documentation as a series of the project.
-
OpenBSD gives us good documentation as a series of the project.
Scqr [secureal]
Scqr [secureal]: the engineering practice of Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.