Install SQL Server in Ubuntu

seffu

Seffu Kioi Nyambura

Posted on April 26, 2022

Install SQL Server in Ubuntu

Microsoft SQL Server is one of the most prominent databases in the industry today. In this post, I will show you how to install it on Ubuntu.

Prerequisites

  • Account with sudo privileges

Procedure:

Step 1: Open terminal
Use the shortcut Ctrl + alt + t to open the terminal

Step 2: Import the public repository GPG keys

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
Enter fullscreen mode Exit fullscreen mode

import
Step 3: Register the Microsoft SQL Server Ubuntu repository for SQL Server 2019

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
Enter fullscreen mode Exit fullscreen mode

download
Step 4: Install SQL Server

sudo apt update && sudo apt install -y mssql-server
Enter fullscreen mode Exit fullscreen mode

install
Step 5: Follow the prompts to choose your edition, accept license terms and set the SA password.

sudo /opt/mssql/bin/mssql-conf setup
Enter fullscreen mode Exit fullscreen mode

setup
Step 6: Verify that the service is running

systemctl status mssql-server --no-pager
Enter fullscreen mode Exit fullscreen mode

status

Next Step:

Install SQL Server command-line tools

💖 💪 🙅 🚩
seffu
Seffu Kioi Nyambura

Posted on April 26, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Install SQL Server in Ubuntu
ubuntu Install SQL Server in Ubuntu

April 26, 2022