In this post I want to cover running SQL Server on Linux on your own laptop. For the benefit all of you out there who have yet to experiment with SQL Server on Linux and are probably about to start your journey.
However, others may also find this post useful.
I must confess it still feels a bit surreal using Linux again after having to relearn it to setup a Hadoop environment years ago. Especially now that Hadoop and Spark will potentially be included as part of Big Data Clusters in SQL Server 2019.
Nevertheless, I started this blog to help people in the industry. So if I see a need for information I will post it.
During my session at SQLBits I realised that there are some people who are new to using SQL Server on Linux. When asked what Linux distribution to use to be as close to a RHEL production environment as possible somebody went for Ubuntu.
I suspect it is because they are most familiar with that distribution. Now when I say distribution what I mean is a slightly different version of Linux. Because there are different versions which install software differently.
To accompany this post, I recently ran a quick poll on Twitter about which Linux distribution is used by people using Microsoft technologies, the results are below.
As stated earlier this post is mostly aimed at people who are relatively new to SQL Server on Linux. Therefore, I will discuss only the basics. Feel free to jump to one of the below sections.
Note
Now to be accurate I have to clarify the content of this post before I discuss the Linux distribution with you.
There are various distribution options to choose from. So for this post I limited myself to only cover running SQL Server on Linux locally. If I had to conclude any cloud related offerings then this post would be even bigger.
For the same reason I will not be covering all Linux distributions. Because there simply are too many of them. However, if you have installed it on another distribution feel free to share with a comment.
As of late I have used the RHEL distribution the most. For that reason there will be slightly more RHEL covered than the other distributions in this post.
And last but not least, I will only be covering the supported distributions listed by Microsoft which are listed here and their immediate variants.
Docker
Now, for those of you who have yet to install Docker Desktop it can be reasonably painless. However, if you are running a Windows Operating System with a hypervisor other than Hyper-V then you can encounter some issues.
Its fine to install Docker for Windows besides an configured virtual machine to run in Hyper-V. All it will do is create another virtual machine called MobyLinuxVM next to your existing ones.
MobyLinuxVM needs at least 2GB of ram so that Docker can start. So I recommend that you check if any of the running virtual machines can be closed before the installation of Docker.
You can download it and read about it more in detail from here.
If you are going to test SQL Server 2017 on Linux, you have the two following options:
- Firstly, you can download an image supplied by Microsoft based on the Ubuntu Linux distribution.
- Secondly you can build an image yourself based on a sample dockerfile by following Microsofts configuration guide here.
However, for SQL Server 2019 you can also download an image based on Red Hat Enterprise Linux. So, if you want a version close to the RHEL experience instead you can use that. In fact, this version appears to have SQL Server Agent enabled by default.
Recently Docker have changed their terms of use for Docker Desktop. You can read more about how the changes apply to Docker Desktop in section 4.2 of the Docker Subscription Service Agreement.
Virtual Machines
As you can probably tell from my previous post here I use Hyper-V on my Windows laptop. However, this may not be your personal choice for various reasons.
For example, you may be using MacOS or Linux as your main Operating System instead of Windows on your laptop. In which case Hyper-V is not available.
You may want to use virtual machines instead of Docker for various reasons. For example, you might want the installation experience to be more production or have more flexibility.
Whatever your choice is be aware that if you use any of the other hypervisors on Windows Operating System you may experience issues if you decide to install Docker for Windows afterwards.
Now, you do have well documented options for which distributions of Linux SQL Server is supported on. Which I previously highlighted in this post.
It certainly makes sense to test SQL Server on whichever distribution of Linux you suspect you will be using the most in production.
However, with some distributions there are some finer points to consider. Plus, with some distributions there are some (free) variants you can potentially use instead for testing purposes on your laptop.
Red Hat Enterprise Linux (RHEL)
As stated earlier I will be discussing RHEL the most in-depth. RHEL is one of the most popular Enterprise solutions on the market. Even more so after last year’s announcement that it was merging with IBM.
Now, if you want to test this running as a Virtual Machine on your own laptop you are spoiled for choice.
RHEL evaluation edition
One thing to be aware of is that the evaluation edition comes with a 30-day evaluation period. So, when you install the evaluation edition as a Virtual machine be aware that you must finish the installation completely before this period expires.
You can find out more about it in detail here.
RHEL through the developer program
If you sign up to the Red Hat Developer program you are eligible to download and use a copy of RHEL for non-production use. Which means you could install it on a virtual machine locally to test SQL Server.
You can find out more about the no-cost announcement for the developer program in detail here.
Licensed RHEL
Due to the licensing costs it’s very rare that a company has a spare RHEL license available for you to use on your own laptop. However, if you are lucky enough to work for such a company, you can use that.
You can indeed read all about it in detail here.
CentOS
Now some of you might be wondering what CentOS got to do with RHEL. Well, CentOS is essentially the community version of RHEL. In fact, it uses the same binaries.
The main difference is that CentOS has no Red Hat branding and no enterprise support. Therefore, there are limited online forums and search engines that you can use if you encounter any issues.
However, CentOS is free to download and use. I have used it myself to test SQL Server on Linux and even though it’s free it runs fine.
So, if you are a first timer and you don’t want to sign up for anything, this might be the option for you. You can find out more about CentOS in detail here.
SUSE
SUSE is another Linux distribution that seems to have been around forever. I remember a long time ago it was available in the UK. You could buy it on multiple green CD’s.
A long running time is a testament to how popular it still is. In fact, just last week it announced that it was an independent company again. Will this make a difference to SQL Server only time will tell. You can read about that in detail here.
Yet again, SUSE would be a good test distribution if your workplace uses it. You can find out more about it in detail here.
SUSE Linux Enterprise Server
Now this is the officially supported version of SUSE. It has infrequent updates so that it is stable for Enterprise use.
This version also comes with a free 60 day trial. As far asthe limitations of this free trial are concerned I have no idea. However patches and updates can be done. You can find out more about it in detail here.
SUSE Linux Enterprise Desktop
In theory, there is nothing to stop you installing SQL Server on the Enterprise Desktop version instead for testing. Because I haven’t tried it, I can’t give you more information about it.
Therefore, I want to ask the people who have tried it to help us by leaving your user experience in the comments of this post.
openSUSE
Now, I was first introduced to openSUSE eleven years ago. However, I have not used it much over the years.
It is a distribution that is based on SUSE Linux Enterprise and is free. In theory, you should be able to install SQL Server on there and test how it would behave on SUSE.
You can download openSUSE and find out about it in detail here.
Ubuntu
Ubuntu is developed by Canonical and a very popular version of Linux. You can use it yourself for free or pay for professional services in production.
It’s thanks to its popularity that you can use a version of Linux on your personal laptop for free.
So, if you are looking to use SQL Server on Linux for the first time and no idea which version you will look to use in the workplace this may well be a good option.
Ubuntu Server
Now, when you first look at SQL Server on Linux documentation it just says Ubuntu is supported.
However, when you delve into the Ubuntu download section it points to the download for the server edition. Which makes sense as that is enterprise ready.
Ubuntu Desktop
This is something else I did not test, but yet again don’t let that stop you of installing SQL Server on Ubuntu Desktop for testing.
However, before you start installing I do want point out that there are other variants you might be able to install SQL Server on. You can see the list of these variants details here.
For more information in detail about Ubuntu you can follow this link here.
Final words
Anyway, there’s my overview of distributions you can use to test SQL Server on Linux locally on your laptop. I’ve done this to the best of my knowledge and I hope it helps.
If you have a strong preference on any of these, or just a viewpoint you are more than welcome to add a comment below.
[…] In that post I discussed Docker, as well as the various versions of Linux you could use for testing purposes within virtual machines. For those of you yet to read it you can in detail here. […]
[…] Of course, there are other Linux distributions and variants you can install SQL Server on instead of CentOS. You can read more about the various Linux distributions you can install SQL Server on in my previous post here. […]
[…] You might want to test Linux a bit more because you want to use some of the new features in SQL Server 2019. If you want to find out more about what versions of Linux you can use for testing you can read my previous post here. […]
[…] Running SQL Server on Linux on your own laptop […]
[…] If you’re unsure about which version of Linux to use to start with you can read my previous post. It contains details about which versions you can use, which you can view in detail here. […]