Install Microsoft SQL Server (MS SQL) on RHEL (CentOS) / Ubuntu

Microsoft has released SQL Server for Redhat Enterprise Linux and Ubuntu; you can now start testing this latest preview of SQL Server in your environment.

This version is still in preview; it is meant for testing and development purpose only. Try it on your own.

Supported Operating Systems:

Redhat Enterprise Linux 7.2
Ubuntu 16.04

Setup Repository:
### Ubuntu 16.04 ###

$ sudo apt-get install -y wget
$ wget
$ sudo apt-key add microsoft.asc
$ curl | sudo tee /etc/apt/sources.list.d/mssql.list
$ curl | sudo tee /etc/apt/sources.list.d/msprod.list

### CentOS 7 ###

# yum -y install wget
# wget
# wget
# mv *.repo /etc/yum.repos.d/mssql.repo
Install MS SQL Server on Linux:

### Ubuntu 16.04 ###

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

### CentOS 7 ###

# yum install -y mssql-server
Setup MS SQL server.
### Ubuntu 16.04 ###

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

### CentOS 7 ###

# /opt/mssql/bin/sqlservr-setup


Microsoft(R) SQL Server(R) Setup

You can abort setup at anytime by pressing Ctrl-C. Start this program
with the --help option for information about running it in unattended

The license terms for this product can be downloaded from and found
in /usr/share/doc/mssql-server/LICENSE.TXT.

Do you accept the license terms? If so, please type "YES": YES

Please enter a password for the system administrator (SA) account: Enter Admin Password
Please confirm the password for the system administrator (SA) account: Re Enter Admin Password

Setting system administrator (SA) account password...

Do you wish to start the SQL Server service now? [y/n]: n

You can use sqlservr-setup --start-service to start SQL Server, and
sqlservr-setup --enable-service to enable SQL Server to start at boot.

Setup completed successfully.
Start the MS SQL Service.
### Ubuntu 16.04 ###

$ sudo systemctl start mssql-server
$ sudo systemctl enable mssql-server

### CentOS 7 ###

# systemctl start mssql-server
# systemctl enable mssql-server

Install SQL Server tools on Linux:
It provides command line tools (sqlcmd and bcp), ODBC drivers and their dependencies.
### Ubuntu 16.04 ###

$ sudo apt-get install -y mssql-tools

### CentOS 7 ###

# yum install -y mssql-tools

Accept License terms

Firewall (CentOS / RHEL):

Configure the firewall to allow 1433 port so that we can access the SQL server from external machines.
# firewall-cmd --permanent --zone=public --add-port=1433/tcp
# firewall-cmd --reload
Connect to MS SQL server:

Once the installation is complete, connect to MS SQL server using the following command.
sqlcmd -H -U sa


Microsoft Official Document Here

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


  1. Good day! I know this is kind of off topic but I was wondering if you knew where I could get a captcha plugin for
    my comment form? I'm using the same blog platform as yours best android security and antivirus app
    I'm having trouble finding one? Thanks a lot!

  2. You actually mentioned that well!

  3. It's not my first time to pay a quick visit this website, i am
    browsing this web site dailly and take nice data from here
    every day.

  4. Hey I know this is off topic but I was wondering if you knew of any
    widgets I could add to my blog that automatically
    tweet my newest twitter updates. I've been looking for a plug-in like this for quite
    some time and was hoping maybe you would have some experience with something like this.

    Please let me know if you run into anything. I truly enjoy reading your blog and I
    look forward to your new updates.

  5. If some one desires to be updated with newest technologies afterward he must be visit
    this web page and be up to date everyday.

  6. An intriguing discussion is worth comment. There's no doubt that
    that you need to publish more on this topic, it may
    not be a taboo subject but usually people don't talk about these
    subjects. To the next! All the best!!

  7. Hello! This post couldn't be written any better! Reading through this post reminds me
    of my good old room mate! He always kept talking about this.
    I will forward this write-up to him. Fairly certain he will have a good read.

    Thank you for sharing!

  8. Having read this I believed it was really enlightening.
    I appreciate you finding the time and effort to put
    this informative article together. I once again find myself personally spending way too much time both reading and commenting.
    But so what, it was still worthwhile!

  9. For newest information you have to go to see world-wide-web
    and on internet I found this web page as a best website
    for most recent updates.

  10. Wow, awesome blog format! How long have you ever been running
    a blog for? you make blogging glance easy. The full look of your
    web site is fantastic, let alone the content material!

  11. It's truly very difficult in this busy life to listen news on Television, thus I only use world wide web for that
    reason, and obtain the hottest news.

  12. Excellent post. I used to be checking continuously this weblog and I'm
    inspired! Very useful info specially the final phase
    :) I care for such info much. I used to be seeking this certain information for a very long time.
    Thank you and best of luck.

  13. Have you ever thought about adding a little bit more than just your
    articles? I mean, what you say is fundamental and all. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"!
    Your content is excellent but with pics and video clips, this
    site could undeniably be one of the very best in its niche.
    Good blog!

  14. Thanks for every other informative blog. Where else could I get that kind of information written in such a perfect
    manner? I have a undertaking that I am simply now working on, and I have been on the glance
    out for such info.

  15. Hello, i think that i saw you visited my blog so i
    came to “return the favor”.I am trying to find things to enhance my site!I suppose its ok to use some of your ideas!!

  16. I know this web page gives quality depending articles or reviews and other information, is there any other website which provides such stuff in quality?

  17. Howdy! Would you mind if I share your blog with my myspace group?
    There's a lot of folks that I think would really enjoy your content.
    Please let me know. Cheers

  18. That is a very good tip especially to those fresh to the blogosphere.
    Short but very precise information… Many thanks for sharing this
    one. A must read post!

  19. I like it when individuals come together and share ideas.
    Great website, continue the good work!

  20. If textile seems really rigid, or alternatively, if it appears less durable and has a tendency to slouch in place of
    hold its shape, these is indicators of a counterfeit case.
    In addition watch for artificial suede that is comprised of textile with a sueded effect, however no real

  21. Schoene Seite ;)

  22. Hey very nice blog!

  23. I am rеally enjoying the theme/design оf your site.
    Ɗo yօu eνer run into any browser compatibility issues?
    Ꭺ small nunber of my blog audience һave complained ɑbout my blog noot operating correctly іn Explorer but ⅼooks great in Firefox.
    Dо you have any tips to help fix this рroblem?

  24. Ι was curious if үou evesr consіdered changing thе layout of ʏour website?
    Іts ᴠery weⅼl written; I love wһat youve goot to sаy.
    Ᏼut mɑybe үou coᥙld a little more in thе waү of
    cotent so people coulld connect ᴡith it Ьetter.
    Youve got an awful lot of text for оnly having 1 oг ttwo images.

    Maybe you couⅼd space it out better?

  25. I was recommended this web site by mʏ cousin. Ӏ'm not ѕure ԝhether tһіs post is written by
    him aѕ nobody else know ѕuch detailwd ɑbout my trouble.
    Үou aгe wonderful! Thanks!

  26. Hey there! I'vе bееn f᧐llowing ʏour blog for some time now ɑnd fibally gⲟt thhe
    bravery tߋo go ahead ɑnd ցive yoս ɑ shout oսt from
    Dallas Tx! Јust wanted to mention keep սp
    the great worҝ!

  27. Wе stumbled оver here bby a diffеrent web address
    аnd thought I might check things ᧐ut. I ⅼike what I
    see ѕo now i'm f᧐llowing yoᥙ. Loⲟk forward tⲟo exploring ʏour web
    page again.

  28. My spouse and I stumbled oѵer here ϲoming fropm a diffеrent wesite and thⲟught І
    may as wеll check things օut. I like what I
    see s᧐ i aam јust folⅼowing you. Loⲟk forward to checking оut
    your web page again.

  29. Ꮤhat a data of un-ambiguity and preserveness ⲟf valuable knowledge
    concerning unexpected feelings.

  30. Tһank you a lot for sharing this with all of us yyou ɑctually recognize
    ѡhat you're talking about! Bookmarked. Kindly additionally consult ԝith mmy website =).
    Ꮃe cаn hqve a link trade arrangement betweеn us

  31. Wow that wɑs strange. I just wrote an incredibly lοng comment but afteг I clicked submit mу
    omment ԁidn't show սp. Grrrr... well I'm not writing aⅼl
    that over again. Anyway, jսst wanted tⲟ say
    wonderful blog!

  32. Thіs paragraph wiⅼl assist tһe internet users for setting up new website ⲟr eveen a blog
    from start tօ end.

  33. I ѡas recommended tһis blog ƅy mу cousin. I am not sure wһether tһis post
    is written by him ass no οne else know such detailed
    abot mmy difficulty. У᧐u're amazing! Τhanks!

  34. Wow! Іn the end I gօt a webpage from ᴡheгe I can geninely tke ᥙseful information regardng my study and knowledge.

  35. Cool blog! Is yoսr theme custom made or did you download іt frtom somewһere?
    Α design liқe yourѕ with a few simple tweeks ԝould гeally mzke my blog
    shine. Ꮲlease ⅼet me know where үou got your theme.
    Thanks a lot

  36. Magnificent beat ! І wish to apprentice whіlе yoս amend yoᥙr website,
    һow coᥙld i subscribe for a blog web site?
    Thhe account aided me a acceptable deal. І haⅾ
    bеen tiny bbit acquainted of thіs yߋur broadcast offered bright сlear idea

  37. Hi thеre, juѕt bеcame alert tο yоur blog
    througһ Google, and fond that іt is гeally informative.
    Ӏ'm ցoing to watch oսt for brussels. I'll aⲣpreciate if yoᥙ continue
    this in future. Numerous peoplee ѡill Ƅe benefited frоm
    your writing. Cheers!

  38. After going ⲟveг a handful of tһe blog posts ߋn үour
    web site, I reaally ⅼike your technique of writing ɑ blog.
    І addded it to mү bookmark webpage list аnd will be checking ƅack soօn. Pleasе check
    out mmy webb site too ɑnd teⅼl me youг opinion.

  39. This is my first time pay a visit at here and i am in fact pleassant to read all at
    alone place.

  40. Thanks very nice blog!

  41. Fantastic beat ! I would like to apprentice while you amend your site, how could i subscribe
    for a blog site? The account helped me a acceptable deal. I
    had been tiny bit acquainted of this your broadcast provided bright
    clear idea

  42. I'm not sure why but this blog is loading incredibly
    slow for me. Is anyone else having this issue or is
    it a problem on my end? I'll check back later on and see if the problem still exists.

  43. Hi to every , for the reason that I am actually eager of reading this blog's post to be updated regularly.
    It includes good material.

  44. I blog quite often and I really appreciate your content.

    The article has truly peaked my interest. I am going to bookmark your
    site and keep checking for new details about once per week.
    I subscribed to your RSS feed too.

  45. Right here is the right web siye for anyone
    wwho really wants to find out about this topic. You understand so much itss almost hard to argue with you (not tat I
    actually will need to…HaHa). You certainly put a brand new spin on a topic that's been written about for ages.
    Excellent stuff, just excellent!

  46. I all the time emaailed this weblog post pge to all my friends, as if like to read
    it afterward my friends will too.

  47. I am curious to find out what blog platform you are working with?
    I'm having some small security problems with my
    latest site aand I would like to finjd something more safeguarded.
    Do you have any recommendations?

  48. I've been surfing online more than 4 hours
    today, yet I never found any interesting article like yours.
    It's pretty worth enough for me. Personally, if all website owners and bloggers made good cpntent as you
    did, the net will be much more useeful tuan ever

  49. Having read this I thought itt was really informative. I appreciate
    you taking the time and energy to put this informative article
    together. I onhce again find myself personally spending a lot of time both reading
    and leaving comments. But so what, it was still worrh it!

  50. My spouse and I stumbled over here from a differenbt web address and thought I should check things out.
    I likoe what I see so i am just following you. Look forward to looking
    over your web page ffor a second time.

  51. It is truly a great and useful piece of information. I'm satisfied that you shared this helpful info with us.
    Please keep us up to date like this. Thanks for sharing.

  52. Piece of writing writing is also a excitement, if you be acquainted with then you can write or else it is difficult to write.

  53. I've learn a few just right stuuff here. Definitely
    pricce bookmarking for revisiting. I surprise how a lott attempt youu place to make this type of excellent informative web site.

  54. Hi there outstanding blog! Doess running a blog like this take a massive amount work?

    I've virtually no understanding of programming however I had been hopiing too start my own blog in the
    near future. Anyways, if you have any suggestions or
    tips forr nnew blog owners pleaae share. I understand this is off subject nevertheless I simply needed to ask.


  55. whoah this blog is wonderful i love studying your posts.
    Stay upp the great work! You realize, many individuals
    are searching around for this info, youu could aid
    them greatly.

  56. I know this web site provides quality based content and extra stuff, is there any other website which provides such things in quality?

  57. Thanks to my father who informed me regarding thbis blog, this weblog iis actuzlly amazing.

  58. I'm impressed, I have to admit. Rarely do I come across a
    blog that's equally educative and entertaining, and without a doubt, you've hit the
    nail on the head. The issue is something which not enough folks are speaking intelligently about.
    I'm very happy I stumbled across this in my search for something regarding this.

  59. Good site you have got here.. It's hard to find excellent writing like yours these days.
    I seriously appreciate individuals like you! Take care!!

  60. I know this if off topic but I'm looking into starting my own blog and was
    curious what all is needed to get setup? I'm assuming having a blog like yours would cost a
    pretty penny? I'm not very internet savvy so I'm noot
    100% certain. Any suggestions oor advice woould be greatly appreciated.
    Appreciate it

  61. Hi, I do believe this is a great website. I stumbledupon it ;) I may return once again since i have book-marked it.
    Money and freedom is the best way to change, may you be rich and continue to guide other

  62. Good answer back in return of this matrer with genuine arguments and describing the whole thing regarding that.

  63. That is a good tip especially to those fresh to the blogosphere.
    Simple but very accurate info… Thanks for sharing this one.

    A must reead post!

  64. I waas curiius if you ever thought of changing the structure of your
    site? Its very well written; I love what youve got tto
    say. But maybe you could a little mlre inn the way of content so people could connect with it better.

    Youve got an awful lot of text for only having 1 or 2 pictures.
    Maye you could spacce it out better?

  65. I could nnot resist commenting. Well written!

  66. What's up to all, how is everything, I think every one is
    getting more from this site, and your views are nice in favor of new

  67. Greetings! Very useful advice in this particular
    article! It is the little changes that make the most significant changes.
    Thanks for sharing!

  68. Hi colleagues, how is the whole thing, and what you desire to
    say on the topic of this post, in my view its really awesome designed for me.

  69. I got this site from my friend who told me about this web page and at
    the moment this time I am visiting this web site and reading very informative articles at
    this time.

  70. I blog often and I truly thank you for your information.
    This article has really peaked my interest.
    I will take a note of your website and keep checking for new details about
    once per week. I opted in for your RSS feed as well.