Microsoft SQL Server 2017 has been available for full use on RHEL 7 since October 2017, and Red Hat worked closely with Microsoft on RHEL 8 Beta to improve performance and provide support for more programming languages ββand application frameworks, and offer developers more choice. available tools to work on their next application.
The best way to understand the changes and their impact on your work is to try them out, but RHEL 8 is still in beta and Microsoft SQL Server 2017 is not supported for use in real applications. What to do?
If you want to try out SQL Server on RHEL 8 beta, this post will help you get it up and running, but you should not use it in a production environment until Red Hat Enterprise Linux 8 is publicly available and Microsoft makes their officially supported package available for installation.
One of the main objectives of Red Hat Enterprise Linux is to create a stable,
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, which have already been migrated to more recent versions in RHEL 8 Beta. The inclusion of older versions was done by Red Hat specifically to maintain backward compatibility.
sudo yum install python2
sudo yum install compat-openssl10
Now you need to deal with the original python settings on this system.
sudo alternatives βconfig python
You will be prompted to select a version of Python, after which a symbolic link will be created that will persist after the system is updated.
There are three different executables 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 select the second option, after which a symbolic link will be created from /usr/bin/python2 to /usr/bin/python.
You can now continue configuring your system to work with the Microsoft SQL Server 2017 Software Repository 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
Next, download the SQL Server 2017 installation files using the new download feature in yum. You need to do this in such a way that you can install without having to resolve dependencies:
sudo yum download mssql-server
Now let's install the server without resolving dependencies using the rpm command:
sudo rpm -Uvh βnodeps mssql-server*rpm
After that, you can continue with the normal installation of SQL Server, as described in the Microsoft Quick Start: Installing SQL Server and Creating a Database in Red Hat from step #3:
3. ΠΠΎΡΠ»Π΅ Π·Π°Π²Π΅ΡΡΠ΅Π½ΠΈΡ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΏΠ°ΠΊΠ΅ΡΠ° Π²ΡΠΏΠΎΠ»Π½ΠΈΡΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ mssql-conf setup ΠΈ ΡΠ»Π΅Π΄ΡΠΉΡΠ΅ ΠΏΠΎΠ΄ΡΠΊΠ°Π·ΠΊΠ°ΠΌ Π΄Π»Ρ ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠΈ ΠΏΠ°ΡΠΎΠ»Ρ ΡΠΈΡΡΠ΅ΠΌΠ½ΠΎΠ³ΠΎ Π°Π΄ΠΌΠΈΠ½ΠΈΡΡΡΠ°ΡΠΎΡΠ° (SA) ΠΈ Π²ΡΠ±ΠΎΡΠ° Π²Π°ΡΠ΅ΠΉ Π²Π΅ΡΡΠΈΠΈ.
sudo /opt/mssql/bin/mssql-conf setup
After the installation is complete, you can check the version of the installed SQL server using the command:
# yum list βinstalled | grep mssql-server
Support containers
With the release of SQL Server 2019, installation promises to be even easier, as this version is expected to be available on RHEL as a container. SQL Server 2019 is already available in beta. To try it in RHEL 8 Beta, it only takes three steps:
First, let's 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 download the container with SQL 2019 Beta from the Microsoft Container Repository with the command:
sudo podman pull mcr.microsoft.com/mssql/rhel/server:2019-CTP2.2
Finally, the SQL server needs to be configured. In this case, we will set an administrator (SA) password for a database called sql1 running on 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 a bunch of RHEL 8 Beta and SQL Server 2017 both using a traditional installation and using a container application installation. In any case, you now have a running instance of SQL Server at your disposal, and you can start seeding the database or explore the tools available in RHEL 8 Beta to create an application stack, automate the tuning process, or optimize performance.
In early May, be sure to listen to Bob Ward, Senior Architect at the Microsoft Database Systems Group, at the Summit
And on May 8, an official release is expected, opening the use of SQL Server in real applications.
Source: habr.com