Install SQL Server on Linux

Install SQL Server on Linux

Hi friends, in this post we will learn how to Install SQL Server on Linux. Recently SQL Server team releases SQL Server vNext CTP 1.4 for Linux. It’s the same SQL Server database engine that runs on windows with some of many features and services. Installation of SQL Server on Linux is quick and simple.

Installation Requirements:
1. Red Hat Enterprise Linux Physical or Virtual machine with 7.3 version.
2. Internet Connection.
3. Minimum 3.25GB of memory.

Steps to Install SQL Server on Linux
Open terminal and run following commands:
1. Enter superuser mode.

Sudo su

2. Now Download the Microsoft SQL Server Red Hat repository configuration file:

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

3. Exit superuser mode

 Exit

4. Run following command to install MSSQL Server.

 Sudo yum install mssql-server

5. After installation finished, run below mention command to configure SQL Server.

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

It will ask for SA password, Make sure to specify a strong password for the SA account (Minimum length 8 characters, including uppercase and lowercase letters, base 10 digits and/or non-alphanumeric symbols)
Steps to install SQL Server Tools on Linux:

Follow from step 1 to step 3 as mentioned above.
1. Remove any older unixODBC packages if installed.

sudo yum update
sudo yum remove unixODBC-utf16 unixODBC-utf16-devel

2. Install MSSQL tools with unixODBC developer package.

sudo yum update
sudo yum install mssql-tools unixODBC-devel

3. To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile

Video Tutorial