Skip to the content

SQL Server On Linux Requirements Checklist

We discussed in a previous post how SQL Server really runs on Linux. Now we are going to expand on the requirements to make it happen. What must be understood about all this is that SQL Server is not your typical software package; it needs enough storage to handle the data, enough RAM to efficiently work with the data, and a good(if not great) CPU to behave efficiently. Additionally, only certain Linux distributions and versions are supported to run SQL Server.

As of this post, the following Linux distributions are supported:

  • Red Hat Enterprise Linux 7.3, 7.4, 7.5, 7.6, and 8.0
  • SUSE Linux Enterprise Server v12 SP2, SP3, SP4, and SP5
  • Ubuntu 16.04 and 18.04
  • Docker Engine 1.8+

We recommend, if possible, to use the most recent version of your choice of Linux. That said, Canonical recently launched Ubuntu 20.04 LTS but SQL Server is still not supported on that platform. One important distinction here is that while the supported platform list does not discriminate between desktop or server editions of the distributions; we strongly recommend running SQL Server on a server edition unless you are using a development machine that can safely run SQL Server Developer Edition.

In addition to the Linux distribution, the hardware that will run SQL Server also has some minimum requirements:

  • At least 2GB of Memory
  • The filesystem must be XFS or EXT4
  • At least 6GB of disk space (this is to install SQL Server, not to store your databases)
  • At least 2 CPU cores running at 2 GHz in an x64 architecture

With that, here is the checklist that should help you not just verify your environment but also document it. Note that the checklist is platform-independent and will guide you through the entire set of requirements.

Checklist

  1. Which platform do I have?
  2. Is it a supported platform?
  3. How much memory do I have?
  4. Do I have enough memory?
  5. What type of file system do I have?
  6. Is my file system supported?
  7. Do I have enough disk space to install SQL Server?
  8. Do I have enough disk space for my databases?
  9. What type of CPU do I have?
  10. Does my CPU comply with the requirements?

Example

Let's use our checklist to verify that we can run SQL Server on a Linux server. Imagine you were just given access to this server and you only know your credentials and perhaps the platform (Ubuntu, RHEL, etc.). I'm going to show you some commands to validate all the information in the checklist which will come handy if your background has been just Windows.

  1. Which platform do I have?

    Run the command: lsb_release -a


    In Red-Hat Enterprise Linux the lsb package is not installed by default and you will get an error running this command like this


    To run the command you will need to install the lsb modules. E.g. for RHEL, run sudo yum install redhat-lsb-core or alternatively you could run the hostnamectl command and get the following output


  2. Is it a supported platform?
    Yes, Ubuntu 18.04.3 LTS (or Red Hat Enterprise Linux 8.0)

  3. How much memory do I have?

    To find how much memory you have run the free command. Using the parameter -h (human-readable) will be easier to read the the memory.


    Note columns: total, used, and free. SQL Server will normally check the total memory but be mindful that it will need its own bucket of memory so as a best practice, run only SQL Server on the server and nothing else so it will be able to use as much as needed.

  4. Do I have enough memory?
    Yes, 4GB total and 3.2GB free

  5. What type of file system do I have?

    Run the command df -Th. This command will display the list of mounted filesystems and the parameters -T will make it display a column with the type of filesystem, and h to show the sizes in human-readable format.


  6. Is my file system supported?
    Yes, /dev/sda2 filesystem is EXT4.

  7. Do I have enough disk space to install SQL Server?
    Yes, you can see from the output of the df command type, disk size is 20GB and has 13GB available.

  8. Do I have enough disk space for my databases?

    If you have done your capacity planning you should already have an estimate of the space. If you don't have enough space you could mount a partition or disk with enough space for them. E.g. run sudo fdisk -l to list the available partitions


    Now, create a directory that will serve as the mount point for the disk


    Edit the /etc/fstab file and add the information to mount the disk




    Reload all the partitions that need mounting with the command mount -a and see the results with df -Th again.




    With this, you now have 20GB for your databases.

  9. What type of CPU do I have?

    To find the CPU information, you need to run the command lscpu.



  10. Does my CPU comply with the requirements?
    Yes, from the result of lscpu we can see clearly that the CPU speed is well above the 2 GHz requirement, it has 2 cores and runs the x64 architecture.

Conclusion

Following this checklist, you are guaranteed to have clear documentation of the environment where you plan to install SQL Server and you will have examined all the requirements to ensure SQL Server will run.

Jose R. Guay

About the author

Jose R. Guay

Software Architect

SQL Server, Linux
chatsimple