Microsoft just launched SQL Server vNEXT CTP1 for Linux, below is tutorial for installing SQL Server on Ubuntu
Prerequisites:
- Internet connection
- At least Ubuntu 16.04 64bit
Here’s the steps to install SQL Server on Ubuntu
-
Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –
-
Add 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
-
Run commands below
sudo apt-get update
sudo apt-get install -y mssql-server
-
Once the installation finish, run the script to install
sudo /opt/mssql/bin/sqlservr-setup
-
Once it’s done, register SQL Server services to the system
systemctl status mssql-server
Install SQL Server Tools
The following steps install the command-line tools, Microsoft ODBC drivers, and their dependencies. The mssql-tools package contains:
- sqlcmd: Command-line query utility.
- bcp: Bulk import-export utility.
Install tools on Linux
-
RHEL
sudo su
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
exit
sudo yum install mssql-tools
-
Ubuntu
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt-get update
sudo apt-get install mssql-tools
Recent Comments