FOLASAYO SAMUEL OLAYEMI
SV_D_CURIOUS_SOFTWARE_ENGINEER'S BLOG

Follow

SV_D_CURIOUS_SOFTWARE_ENGINEER'S BLOG

Follow

Instructions for installing SQL Server on Ubuntu 18.04 or 20.04

FOLASAYO SAMUEL OLAYEMI's photo
FOLASAYO SAMUEL OLAYEMI
·Dec 16, 2022·

1 min read

Play this article

To install SQL Server on Ubuntu 18.04 or 20.04, you will need to follow these steps:

  1. Import the Microsoft GPG key using the following command:
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  1. Register the Microsoft SQL Server Ubuntu repository:
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"

Note: If you are using Ubuntu 20.04, you will need to use the following repository instead:

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
  1. Update the package cache and install SQL Server:
sudo apt-get update
sudo apt-get install -y mssql-server
  1. Once the installation is complete, run the following command to configure your SQL Server instance:
sudo /opt/mssql/bin/mssql-conf setup
  1. Follow the prompts to set the SA password and choose your SQL Server edition.

  2. Once the configuration is complete, start the SQL Server service using the following command:

sudo systemctl start mssql-server

You should now be able to connect to your SQL Server instance from your application. To confirm that SQL Server is running, you can use the following command:

systemctl status mssql-server

I hope this helps! Let me know if you have any questions.

Thanks for reading...

Happy Coding!

 
Share this