LLI Wiki — My Digital Knowledge Base

Install SQL Server 2019 on RHEL 8

Install SQL Server 2019 on RHEL 8: directory layout, Python 2 prerequisites, Microsoft repository and default backup directory.

This guide describes how to install SQL Server 2019 on Red Hat Enterprise Linux 8: preparing the directory layout, the Python 2 prerequisites, installing from the Microsoft repository, and configuring the default backup directory.

Prepare the directory layout

The reference sizes used in the source are 100 GB for data and logs, and 60 GB for tempdb and systemdb. Adjust them to your environment.

sudo mkdir /sql
sudo mkdir /sql/backup /sql/diag /sql/errorlog /sql/scripts /sql/diag/dump

Python 2 prerequisites

On RHEL 8, first check the configuration of the python alternative:

sudo alternatives --config python

If Python 2 is not configured, install the following packages, then select Python 2 as the default interpreter:

sudo yum install python2
sudo yum install compat-openssl10
sudo alternatives --config python

Install from the Microsoft repository

sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/8/mssql-server-2019.repo
sudo yum install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup

Default backup directory

sudo /opt/mssql/bin/mssql-conf set defaultbackupdir /var/sqlbackup
sudo /opt/mssql/bin/mssql-conf set filelocation.defaultbackupdir /sql/backup

Notes

References:

Mastodon LLIMastodon SocialFosstodon