Menu

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 https://packages.microsoft.com/keys/microsoft.asc
$ sudo apt-key add microsoft.asc
$ curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql.list
$ curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list

### CentOS 7 ###

# yum -y install wget
# wget https://packages.microsoft.com/config/rhel/7/mssql-server.repo
# wget https://packages.microsoft.com/config/rhel/7/prod.repo
# 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

Output:

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
mode.

The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388 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
Steps:


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 127.0.0.1 -U sa

Password: 
1>

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

Next
Newer Post
Previous
Older Post

41 comments:

  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!

    ReplyDelete
  2. You actually mentioned that well!

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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!!

    ReplyDelete
  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!

    ReplyDelete
  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!

    ReplyDelete
  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.

    ReplyDelete
  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!

    ReplyDelete
  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.

    ReplyDelete
  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.

    ReplyDelete
  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!

    ReplyDelete
  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.

    ReplyDelete
  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!!

    ReplyDelete
  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?

    ReplyDelete
  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

    ReplyDelete
  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!

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

    ReplyDelete
  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
    suede!

    ReplyDelete
  21. Schoene Seite ;)

    ReplyDelete
  22. Hey very nice blog!

    ReplyDelete
  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?

    ReplyDelete
  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?

    ReplyDelete
  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!

    ReplyDelete
  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ҝ!

    ReplyDelete
  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.

    ReplyDelete
  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.

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

    ReplyDelete
  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

    ReplyDelete
  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!

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

    ReplyDelete
  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!

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

    ReplyDelete
  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

    ReplyDelete
  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

    ReplyDelete
  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!

    ReplyDelete
  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.

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

    ReplyDelete
  40. Thanks very nice blog!

    ReplyDelete
  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

    ReplyDelete

 
Top