Install SQL Server on Ubuntu

Install SQL Server on Ubuntu

Hi friends, in this post we will learn how to Install SQL Server on Ubuntu. Recently SQL Server team releases SQL Server vNext CTP 1.1 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 Ubuntu is quick and simple.

Installation Requirements:

  1. Ubuntu Physical or Virtual machine with 16.04 or 16.10 version.
  2. Internet Connection.
  3. Minimum 3.25GB of memory.

Steps to Install SQL Server on Ubuntu:

Open terminal and run following commands:

1.  Import the public repository GPG keys:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

2.  Register the Microsoft SQL Server Ubuntu repository:

curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list

3.  Run Following commands to install SQL Server:

sudo apt-get update
sudo apt-get install -y mssql-server

After installation it will ask to run SQL Server setup, and this message will be displayed.

Please run /opt/mssql/bin/sqlservr-setup to complete the setup of Microsoft(R) SQL Server(R)

Install SQL Server on Ubuntu

4.  Once the installation finishes, run below command to configure SA password.

sudo /opt/mssql/bin/sqlservr-setup

Setup prompts following option in between configuration:

SQL Server on Ubuntu

Please enter a password for the system administrator (SA) account:
Please confirm the password for the system administrator (SA) account:

Setting system administrator (SA) account password…

Do you wish to start the SQL Server service now? [y/n]: y
Do you wish to enable SQL Server to start on boot? [y/n]: y

5.  Check service running status by running following command.

systemctl status mssql-server

Video Tutorial: