Infrastructure at your Service

David Barbarin

First installation of SQL Server on Linux REHL 7.2

As you certainly know Microsoft announced yesterday the first preview of SQL Server vNext on Linux. Obviously we are far from a final version suitable for production and the list of unsupported features will probably be good indicator of the production maturity over the time.

So as many people, I could not wait to do a try of installing SQL Server on Linux version. The installation process is well documented and I would like to share my first experiences about the installation process.

Firstly, it was a good memory to re-install a Linux server on my lab environment and I have to admit I lost some habits. But keep motivating and I’m sure my reflexes will get back with time. Well, I decided to start my Linux story by installing the SQL Server vNext on the top of a Red Hat Linux 7.2.

For this first attempt, I decided to use a lot of default configurations but for sure it will change in the future. But for the moment it doesn’t matter, I just wanted to focus on the installation process of SQL Server.

I used my existing lab environment that includes Hyper-V on Windows 8.1. I decided not to install the Linux Integration Services for Hyper-V because it seems not to be certified for REHL 7 versions. The installed virtual machines have the corresponding specifications:

–> 4 VCPUS

blog 109 - 0 - 2 - install linux

–> 4GB of memory

blog 109 - 0 - 3 - install linux

–> 50GB of disk space for the root file system but it seems to be too much  … at least for the moment :-)

blog 109 - 0 - 1 - install linux

So according to the Microsoft documentation the first step consists in using the Red Hat package manager YUM to download and install the SQL Server packages after adding the Microsoft SQL Server Red Hat repository file into the /etc/yum.repos.d folder.

blog 109 - 0 - 4 - install linux

Then after running the SQL Server configuration script (/opt/mssql/bin/sqlservr-setup) I faced my first error. Well, more memory to add in order to run SQL Server. Let’s do it!

blog 109 - 1 - install linux

After fixing this issue I may ran the installation process successfully in interactive mode. The installation process created two symbol links that will be managed by systemd and related to the SQL Server Service engine and telemetry (the latter has appeared since SQL Server 2016). We will have the opportunity to discuss further when we will go into more details in this area.

blog 109 - 2 - install linux

blog 109 - 2 - 1 - install linux


The second step consists in installing the client tools which include both sqlcmd and bcp. This step is pretty similar to the previous one because we have first to download the corresponding Microsoft SQL Server Red Hat repository file before installing the client tools. After downloading their packages, I faced a dependency issue as shown below – A kind of issue I almost forgot when I left the Linux World a couple of years ago  :-) – This is a good opportunity to notice that we will use ODBC on linux to connect to SQL Server.

blog 109 - 3 - install linux

Well, let’s install the related missing library I took a look at the internet and I downloaded the libtool-ltdl- rpm package that includes it. After installing the aforementioned package no issue to continue to install the SQL Server client Tools.

blog 109 - 4 - install linux

blog 109 - 5 - install linux

Let’s perform a last check to figure out which port my SQL Server instance is listening

blog 109 - 7 - install linux

TCP 1433 as expected !

And finally let’s connect to my SQL Server instance test via SQLCMD tool and let’s perform my first query:

blog 109 - 8 - install linux

The final test is not new and you already saw this picture directly from Microsoft events, webcasts and so on .. However, it was a good immersion in Linux world with SQL Server and the next time we will try to do more. There are still a lot of pending questions which I have to answer in a near future  :-)

Stay tuned!




Leave a Reply

× seven = 49

David Barbarin
David Barbarin

Senior Consultant & Microsoft Technology Leader