SQL Server ON Linux Installation – Part1 – Install SQL Server on CentOS

In the previous post, we learned how to install SQL Server on Ubuntu Server. Today, we will learn how to install SQL Server on CentOS. The CentOS is a community driven free operating system. I would like to highlight that Microsoft does not officially support SQL Server on CentOS. But, installing SQL Server on CentOs may be a good deal for your test environment as CentOs is a clone or a copy of Red Hat.

At the end of this blog, you will be familiar with the installation of SQL Server on CentOS system.

Install SQL Server on CentOS

  • Download the CentOs media and Install it

To make your life easier, I am sharing the direct link to download the media, but I would strongly recommend to go through the CentOs website and download the media which you suit to your requirement. Kindly follow the link, It will guide how to install the operating system.

  • Once you install the CentOs successfully, connect the system as a root user

Syntax: su root

01connectrootuseroncentos

  • Let’s verify the OS detail of connected system 

Syntaxtail /etc/centos-release

02verifytheoperatingsystem

  • Check you can access the internet on the machine by pinging www.google.com

Syntax: ping www.google.com

internet

  • As I mentioned, the CentOs is a clone or a copy of Red Hat. So, we will be downloading the Microsoft SQL Server Red Hat repository configuration file

Syntax: curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo

03installrepositoryconfiguration-oncentos

  • Let’s install SQL Server

Syntaxsudo yum install -y mssql-server

04installsql-serveroncentos

Once you install it successfully, you will get the ‘Completed!’ message at the end.

04installsql-serveroncentos_1

  • After the package installation, run the configuration script. During the set-up, it will ask you to provide SA account password and your confirmation to restart the SQL Server service.

Syntax: sudo /opt/mssql/bin/sqlservr-setup

07

  • Once the configuration is done, verify that the service is running:

Syntax: systemctl status mssql-server

09verifythesqlservice

Welcome to CentOs environment! In the next part of this series, we will perform the installation of MSSQL Tools on CentOs.

2 thoughts on “SQL Server ON Linux Installation – Part1 – Install SQL Server on CentOS

  • sherriestarkey

    Hello admin ! I read your articles everyday and i must say you have hi quality content here.
    Your website deserves to go viral. You need initial traffic only.

    Reply
  • How to Install Microsoft SQL Server (MS SQL) on RHEL (CentOS)/Ubuntu

    It’s remarkable to pay a visit this web page and reading the views of all colleagues on the topic
    of this article, while I am also keen of getting familiarity.

    Reply

Leave a comment

Your email address will not be published. Required fields are marked *