top of page
  • Obrázek autoraFilip Holub

How to install SQL Server 2017 on Red Hat Enterprise Linux?

Aktualizováno: 30. 1. 2019

In this post, I will demonstrate how to install SQL Server 2017 on Red Hat Enterprise Linux.


I will describe all the process of installation in detail point of view. I have checked a lot of blogs and posts in regards to installing SQL Server on Linux, but most of them didn't mention what does means that command or parameters in command detailly.


System requirements:

  • Red Hat Enterprise Linux - 7.3 and above

  • RAM Memory - 2 GB

  • File System - XFS or EXT4

  • Disk space - Minimum 6 GB

  • Processor - 2 GHz | 2 Cores | x64-compatible only


 

“The main reason why I write this post, I would like to describe in more detail than on other posts and blogs.”

First of all, you have to switch to root user:

  • The following command will download SQL Server Red Hat repository file with configuration:

Note:

  • curl - This command get file using URL syntax.

  • -o - Parameter -o like --output means write output to <file> instead of stdout.

  • /etc/yum.repos.d/mssql-server.repo - The YUM repository will be saved in /etc/yum.repos.d folder from this url https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo


Next step is installation of SQL Server 2017 on RHEL. The command is following:

Note:

  • yum - The Yellowdog Updater, Modified which using RPM Package Manager in RHEL.

  • install -y - Parameter -y means "YES", I agree with installation of mssql-server

This command includes a couple of process:

  1. Download binary RPM package file

  2. Creates User and Group "mssql"

  3. Extract and Install SQL Server binaries

  4. Register SQL Server like system service "mssql-server"


Installation of SQL Server on RHEL

As you can see istallation has been successfully and you can see in output thse section below:


+--------------------------------------------------------------+

Please run 'sudo /opt/mssql/bin/mssql-conf setup'

to complete the setup of Microsoft SQL Server

+--------------------------------------------------------------+


So, next command will be:

This setup will provide following steps:

  • Extract System databases

  • Execute sqlservr that provide post install configuration steps

After executing, you have to choose edition of SQL Server as you can see below:


Choose "Developer edition"
Choose "Developer edition"
  1. Press number 2 for "Developer Editon"

  2. Then write Yes to accept End-User Licensing Agreement(EULA)

  3. And last action si setup of SysAdmin password

Password must have at least 8 characters and must contain:

  • Capital letter

  • Lowercase letter

  • Numbers

  • Specidif symbols


SQL Server has been successfully installed.
SQL Server has been successfully installed.

As you can see our SQL Server has been installed.


In order to able to run query via sqlcmd tools, we have to install package for tools and ODBC, the command is following:

This command also provide downloading tools with configuration file.


For installing of tools run following command:

Then confirm "YES" and again "YES". And installations is completed.


This package will install:

  • Command line tool

  • SQLCMD tool on linux that uses ODBC

Installation of Tools is completed!
Installation of Tools is completed!

The last step is modifying PATH in order to we don't have to write full path for the run tool.


Command for put tool to PATH is following:

You can check if you are able to connect to sqlcmd and exeute query following:

We have done guys, I hope you enjoy this post!

205 zobrazení0 komentářů

Nejnovější příspěvky

Zobrazit vše
bottom of page