Installing SQL Server on CentOS Linux

With Microsoft stating their commitment to SQL Server on Linux, system administrators will need to learn how to install, maintain, and use SQL Server. Preview version packages are already available for Red Hat Enterprise Linux 7, CentOS 7, and Ubuntu Server 16.04 64bit.

The only specific system requirement for the preview version is that you must have at least 3.25 GB of RAM.

Installation instructions for CentOS 7:

  1. Insert the following lines into /etc/yum.repos.d/sql-server.repo:

To install the MS SQL Server command-line tools, create /etc/yum.repos.d/msprod.repo with these contents:


2. Then install the packages using yum package manager, as usual:

# yum install -y mssql-server mssql-tools

When the installation is complete, you will be reminded to run the configuration script (/opt/mssql/bin/sqlservr-setup) to accept the license terms, set the password for the SA user, and start the service. Additionally, you can choose to enable it to start automatically on boot.

3. Open port 1433/tcp on your firewall in order to allow external clients to communicate with the database server:

If you’re using firewalld:

# firewall-cmd --add-port=1433/tcp --permanent
# firewall-cmd --reload

Otherwise (using iptables):

# iptables -A INPUT -p tcp --dport 1433 -j ACCEPT
# iptables-save

You can then use your standard SQL Server Management Studio in Windows to connect to the instance.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.