{"id":1860,"date":"2021-09-01T16:21:50","date_gmt":"2021-09-01T23:21:50","guid":{"rendered":"https:\/\/jim-zimmerman.com\/?p=1860"},"modified":"2021-09-01T16:25:04","modified_gmt":"2021-09-01T23:25:04","slug":"mssql-installation-on-ubuntu-server","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1860","title":{"rendered":"MSSQL Installation on Ubuntu Server"},"content":{"rendered":"<p>The installation itself is not too bad.  It is pretty straightforward.<br \/>\nThis process worked well on Ubuntu 18.x installing Microsoft SQL 2017 and 2019.  The details in this post are for the 2017 version.  The only thing that is different is the repository configuration, and in particular what you download configure the repository to support installing 2019.<\/p>\n<p>Download and add the Microsoft public repository GPG key:<\/p>\n<blockquote><p>wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo apt-key add &#8211;<\/p><\/blockquote>\n<p>Add the Micorosft apt repository:<\/p>\n<blockquote><p>sudo add-apt-repository &#8220;$(wget -qO- https:\/\/packages.microsoft.com\/config\/ubuntu\/18.04\/mssql-server-2017.list)&#8221;<\/p><\/blockquote>\n<p>Update repository mirror list:<\/p>\n<blockquote><p>sudo apt-get update<\/p><\/blockquote>\n<p>Install MSSQL 2017:<\/p>\n<blockquote><p>sudo apt-get install -y mssql-server<\/p><\/blockquote>\n<p>Run the MSSQL setup:<\/p>\n<blockquote><p>sudo \/opt\/mssql\/bin\/mssql-conf setup<\/p><\/blockquote>\n<p>The setup will ask just a couple questions.  One is which version you want to run.  I installed the Developer version.  The second this is to accept the license agreement.<\/p>\n<p>Check MSSQL status to verify it is running:<\/p>\n<blockquote><p>systemctl status mssql-server<\/p><\/blockquote>\n<p>Add the MSSQL tools repository:<\/p>\n<blockquote><p>curl https:\/\/packages.microsoft.com\/config\/ubuntu\/18.04\/prod.list | tee \/etc\/apt\/sources.list.d\/msprod.list<\/p><\/blockquote>\n<p>Update repository mirror list:<\/p>\n<blockquote><p>sudo apt-get update<\/p><\/blockquote>\n<p>Install MSSQL 2017 tools:<\/p>\n<blockquote><p>sudo apt-get install mssql-tools unixodbc-dev<\/p><\/blockquote>\n<p>Add tools directory to account path:<\/p>\n<blockquote><p>echo &#8216;export PATH=&#8221;$PATH:\/opt\/mssql-tools\/bin&#8221;&#8216; >> ~\/.bash_profile<\/p><\/blockquote>\n<p>Add tools directory to account path for non-interactive execution:<\/p>\n<blockquote><p>echo &#8216;export PATH=&#8221;$PATH:\/opt\/mssql-tools\/bin&#8221;&#8216; >> ~\/.bashrc<br \/>\nsource ~\/.bashrc<\/p><\/blockquote>\n<p>Connect to MSSQL via command line:<\/p>\n<blockquote><p>sqlcmd -S localhost -U SA -P &#8216;<YourPassword>&#8216;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>The installation itself is not too bad. It is pretty straightforward. This process worked well on Ubuntu 18.x installing Microsoft SQL 2017 and 2019. The details in this post are for the 2017 version. The only thing that is different is the repository configuration, and in particular what you download configure the repository to support [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[48,218,132],"class_list":["post-1860","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-linux","tag-mssql","tag-ubuntu"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1860"}],"version-history":[{"count":3,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1860\/revisions"}],"predecessor-version":[{"id":1864,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1860\/revisions\/1864"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}