πŸ“œ ⬆️ ⬇️

RHEL 8 Beta Workshop: Installing Microsoft SQL Server

Microsoft SQL Server 2017 has been available for full-fledged use under RHEL 7 since October 2017, and working on RHEL 8 Beta Red Hat worked closely with Microsoft to improve performance and support more programming languages ​​and application frameworks, to offer developers a wider choice available tools for working on their next application.



The best way to understand the changes made and their impact on your work is to try them in action, but RHEL 8 is still in beta, and Microsoft SQL Server 2017 is not supported for use in real-world applications. What to do?

If you want to try out SQL Server on the beta version of RHEL 8, this post will help you run it, but you should not use it in a production environment until Red Hat Enterprise Linux 8 is publicly available, and Microsoft does not provide its officially supported package for installation.
')
One of the main objectives of Red Hat Enterprise Linux is to create a stable, homogeneous environment for running third-party applications . To do this, RHEL implements application compatibility at the level of individual APIs and kernel interfaces. When we move to a new large release, there are usually special differences in package names, new versions of libraries, and new utilities that can cause difficulties when running existing applications built for a previous release. Software vendors may follow Red Hat recommendations to create executable files in Red Hat Enterprise Linux 7 that will work in Red Hat Enterprise Linux 8, but working with packages is another matter. A software package created for Red Hat Enterprise Linux 7 will not be supported in Red Hat Enterprise Linux 8.

SQL Server 2017 on Red Hat Enterprise Linux 7 uses python2 and OpenSSL 1.0. The following steps will provide a working environment that is compatible with these two components that have already migrated to more recent versions in RHEL 8 Beta. The inclusion of older versions was done by Red Hat specifically to preserve backward compatibility.

sudo yum install python2 sudo yum install compat-openssl10 

Now you need to understand the initial settings of python on this system. Red Hat Enterprise Linux 8 can work simultaneously with python2 and python3 , but by default there is no / usr / bin / python on the system. We need to make python2 the default interpreter so that SQL Server 2017 can see / usr / bin / python where it expects to see it. To do this, run the following command:

 sudo alternatives β€”config python 

You will be prompted to select a version of Python, after which a symbolic link will be created, which will remain after the system update.

There are three different executable files for working with python:

  Selection Command β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”- * 1 /usr/libexec/no-python + 2 /usr/bin/python2 3 /usr/bin/python3 Enter to keep the current selection[+], or type selection number: 

Here you need to choose the second option, after which a symbolic link will be created from / usr / bin / python2 to / usr / bin / python.

Now you can continue to configure the system to work with the software repository of Microsoft SQL Server 2017 using the curl command:

 sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo 

Then you should download the SQL Server 2017 installation files using the new download function in yum. You need to do this in such a way that you can complete the installation without having to resolve dependencies:

 sudo yum download mssql-server 

Now install the server without dependency permission using the rpm command:

 sudo rpm -Uvh β€”nodeps mssql-server*rpm 

After that, you can proceed with a typical SQL Server installation, as described in the Microsoft Quick Start: Installing SQL Server and Creating a Database in Red Hat guideline from step # 3:

 3.       mssql-conf setup         (SA)    . 


 sudo /opt/mssql/bin/mssql-conf setup 

After the installation is completed, you can check the version of the installed SQL server with the command:

 # yum list β€”installed | grep mssql-server 

Support containers


With the release of SQL Server 2019, the installation promises to be even easier, since this version is expected to be available in RHEL as a container. SQL Server 2019 is already available in beta. To try it in RHEL 8 Beta, you need just three steps:

First, create a database directory where all our SQL data will be stored. For this example, we will use the / var / mssql directory.

 sudo mkdir /var/mssql sudo chmod 755 /var/mssql 

Now you need to load the container with SQL 2019 Beta from the Microsoft Container Repository repository with the command:

 sudo podman pull mcr.microsoft.com/mssql/rhel/server:2019-CTP2.2 

Finally, you need to configure the SQL server. In this case, we will set an administrator (SA) password for a database called sql1, working with ports 1401 - 1433.

 sudo podman run -e 'ACCEPT_EULA=Y' -e \ 'MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>' \ β€”name 'sql1' -p 1401:1433 -v /var/mssql:/var/opt/mssql:Z -d \ mcr.microsoft.com/mssql/rhel/server:2019-CTP2.2 

More information about podman and containers in Red Hat Enterprise Linux 8 Beta can be found here .

Works for two


You can try the RHEL 8 Beta and SQL Server 2017 bundle using either a traditional installation or a container application installation. In any case, you will now have a working instance of SQL Server at your disposal, and you can go into filling the database or study the tools available in RHEL 8 Beta to create an application stack, automate the tuning process, or optimize performance.

At the beginning of May, be sure to listen to Bob Ward, a senior architect at Microsoft Database Systems Group, at the Red Hat Summit 2019 Summit , which will discuss the deployment of a modern data server platform based on SQL Server 2019 and Red Hat Enterprise Linux 8 Beta.

And on May 8, an official release is expected, opening up the use of SQL Server in real applications.

Source: https://habr.com/ru/post/449436/


All Articles