Buy Me a Coffee

Sunday, November 27, 2016

MSSQL (SQL) on Ubuntu Linux - The easy way


follow the next steps to install MSSQL (SQL) on Ubuntu 16.04 LTS Linux machine.

NOTE: please make sure that the machine which you are about to install MSSQL server on it have got at least 4GB of RAM, otherwise installation will fail.

1. Import the public repository GPG keys:

# wget --no-check-certificate
apt-key add microsoft.asc

2. Add the Microsoft SQL Server to Ubuntu repository:

echo "deb [arch=amd64] xenial main" > /etc/apt/sources.list.d/mssql-server.list

3. update the source repository and install MSSQL

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

4. After the package installation finishes, run the configuration script:

# sudo /opt/mssql/bin/sqlservr-setup

5. Type "YES" to accept the license terms.

6. Enter a password for the system administrator (SA) account, then confirm the password for the system administrator (SA) account.
 Make sure to specify a strong password for the SA account (Minimum length 8 characters, including uppercase and lowercase letters, base 10 digits and/or non-alphanumeric symbols).

7. After setup completed successfully, start the MSSQL service:

#systemctl start mssql-server

8. You may check the service status by typing: 

#systemctl status mssql-server

now that the service is up and running, you may connect to the database and manage it using SQL Server Management Studio using the SA username \ password.

here it is, a MSSQL server running on Linux machine !