top of page
Obrázek autoraFilip Holub

How to install SQL Server 2017 on Ubuntu?

Aktualizováno: 30. 1. 2019

In this post, I will demonstrate how to install SQL Server 2017 on Ubuntu.


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:

  • Import the public repository GPG key :

Note:

  • wget- This command allows you to download files from the Internet.

  • -q - Turn off wget output.

  • -O - Parameter -O like --output-document means write output to file.

  • sudo apt-key add - - Import PGP key from this url https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo


Next step is registration SQL Server Ubuntu repository. The command is following:

Note:

  • add-apt-repository - The command to configure the repository .


Then, you have to download update and after that we can install SQL Server:

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

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



We copy out following command:

After executing, you have to choose the 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

As you can see our SQL Server has been installed. You can chceck status if SQL Server is running with following command:

Result looks like :


In order to able to run query via mssql-tools, we need to register repository of mssql tools with command is following:

This command also provide downloading tools with configuration file.


Then we will download and install tools, run following command:

Then confirm "YES" and again "YES".


Accept license
Accept license

And


Accept license again
Accept license again

And installation is completed.


This package will install:

  • Command line tool

  • SQLCMD tool on linux that uses ODBC

Next step is download update install latest vesrion of mssql-tools.

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:

And for install all downloaded update please run following command:

That's it! I hope you enjoy this post!

410 zobrazení0 komentářů

Nejnovější příspěvky

Zobrazit vše

Comments


bottom of page