How To Install MSSQL Server 2019 On Ubuntu 16.044 min read
In this tutorial how to install mssql server 2019 on ubuntu 16.04. At this time Microsoft provides for linux package for using mssql server 2019. So first install clean ubuntu 16.04 then follow this guide.
★ How To Install Zabbix 5.0 On Ubuntu 20.04 Server
★ How To Install Zabbix Agent On Centos 7
######################### OS Type : Ubuntu 16.04 RAM : 2.5 GB DISK : 25 GB Main IP Address : 10.66.100.16 vCPU : 2 Service : MSSQL Server 2019 #########################
Step #01: Must be server update & upgrade using below command.
[email protected]:~# lsb_release -a [email protected]:~# ip r [email protected]:~# apt update && apt upgrade -y [email protected]:~# apt install software-properties-common [email protected]:~# apt -y autoremove
Add mssql officail repo using below command.
[email protected]:~# wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - [email protected]:~# add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2019.list)"
Then update and install mssql server 2019 on ubuntu 16.04.
[email protected]:~# apt-get update [email protected]:~# apt-get install -y mssql-server
It will take up to 10 or 15 minute, then setup main mssql version using below command.
[email protected]:~# sudo /opt/mssql/bin/mssql-conf setup
I use 2 this is for Developer version. You can use any version from this PAID or free. See mssql service is running.
[email protected]:~# systemctl status mssql-server --no-pager
Now successfully installation done mssql server 2019 on ubuntu 16.04.
Step #02: Install mssql cmd package for using via command line.
[email protected]:~# curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - [email protected]:~# curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list [email protected]:~# apt-get update
Now install mssql cmd package using below command.
[email protected]:~# apt-get install -y mssql-tools unixodbc-dev
It will take up to 5 or 10 minute.
Step #03: Add mssql path into bash_profile.
[email protected]:~# echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile [email protected]:~# echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc [email protected]:~# source ~/.bashrc
Now login mssql terminal via below command.
[email protected]:~# sqlcmd -S localhost -U SA -P '[email protected]@123'
It will take up to 5 or 10 minute.
Step #04: Create test database from command line.
> CREATE DATABASE TestDB > SELECT Name from sys.Databases > GO
Create database table using below command.
> USE TestDB > CREATE TABLE Inventory (id INT, name NVARCHAR(50), quantity INT) > INSERT INTO Inventory VALUES (1, 'banana', 150); INSERT INTO Inventory VALUES (2, 'orange', 154); > GO
Show inserted data using below command.
> SELECT * FROM Inventory WHERE quantity > 152; > GO
Then exit from mssql terminal.
> QUIT
Note : GO is execute command from mssql terminal.
If you not able install this process, so please see my YouTube video for more details.
- How To Install Odoo 16 on Ubuntu 22.04 - May 14, 2023
- 12 Steps to Organize Photos on Your Computer - March 20, 2023
- 9 Ways to Speed Up Your MacBook Yosemite - February 21, 2023
We really appreciate for your support for buying me a coffee.
It takes us a while to compose and upload new content, as they have to be checked to see if Properly works. We appreciate you if you help me for one cup of coffee to keep us awake and always deliver good quality content.
No contribution is small of an amount. We are grateful for any amount you support us with. Thank you!