{"id":144,"date":"2017-04-05T23:23:28","date_gmt":"2017-04-06T02:23:28","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/2017\/04\/sql-server-linux-setup-opensuse\/"},"modified":"2026-09-08T10:05:34","modified_gmt":"2026-09-08T13:05:34","slug":"sql-server-linux-setup-opensuse","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/sql-server-linux-setup-opensuse\/","title":{"rendered":"Installing SQLServer on OpenSUSE"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"Mascote do LinuxPro conectando o cabo ao banco de dados, com o camale\u00e3o do openSUSE ao lado\" src=\"\/wp-content\/uploads\/2026\/09\/sql-server-linux-v3.webp\" width=\"1486\" height=\"856\" \/><\/p>\n<div style=\"background:#fff8e1;border-left:4px solid #8b1a1a;padding:.8em 1em;margin:1em 0\"><strong>Note (2026):<\/strong> Original text from April 2017, still using <em>SQL Server vNext CTP 2.0<\/em> on OpenSUSE Leap 42.2, with the <code data-no-translation=\"\">sqlservr-setup<\/code> installer and the SLES 12 repository. SQL Server for Linux reached GA that same year. In 2026, the current product is <strong>SQL Server 2025 (17.x)<\/strong> \u2014 and Microsoft <em>removed<\/em> SLES from the matrix. OpenSUSE Leap was never an official platform. The supported path on Leap is the container; native installation stays on SLES 15 (SQL Server 2022) or Ubuntu\/RHEL (2025).<\/div>\n<p>In 2017, Microsoft had just released SQL Server on Linux. The shortcut at the time was to paste the <code data-no-translation=\"\">.repo<\/code> from SLES 12 into Leap 42.2 and run setup. Nine years later, the engine is the same \u2014 T-SQL, port 1433, user <code data-no-translation=\"\">sa<\/code> \u2014 but the platform landscape has changed. Anyone still on Leap who wants SQL Server does not install the RPM package on the host: they run the container.<\/p>\n<p><!-- more --><\/p>\n<h2>What changed since the CTP<\/h2>\n<p>SQL Server 2025 (17.x, GA in November 2025, CU 8 in August 2026) runs in production on these platforms, always on <strong>x86-64<\/strong>, using <strong>XFS or ext4<\/strong>, with a minimum of <strong>2 GB<\/strong> of RAM:<\/p>\n<ul>\n<li><strong>RHEL 9 and 10<\/strong><\/li>\n<li><strong>Ubuntu 22.04 and 24.04<\/strong> (24.04 starting with CU 1)<\/li>\n<li><strong>Docker Engine 1.8+<\/strong> (Ubuntu-based image, Intel\/AMD hosts only \u2014 no Rosetta, no QEMU)<\/li>\n<\/ul>\n<p class=\"translation-block\"><strong>SLES was dropped from 2025.<\/strong> Installations of 2017\/2019\/2022 on SLES remain supported until that version's end of life. SQL Server 2022 still installs on SLES 15 SP6. OpenSUSE Leap, Tumbleweed, and Btrfs were never in the matrix: Leap uses Btrfs by default, and Btrfs is <em>not<\/em> supported by the engine.<\/p>\n<p class=\"translation-block\">The configuration command is no longer <code>sqlservr-setup<\/code>. Since GA, it has been <code>\/opt\/mssql\/bin\/mssql-conf setup<\/code>. The command-line tools are in the package <code>mssql-tools18<\/code> in <code>\/opt\/mssql-tools18\/bin<\/code> \u2014 <code>sqlcmd<\/code> 18 encrypts the connection by default; if the server certificate is self-signed, use <code>-No<\/code> (encryption optional).<\/p>\n<h2>Path 1 \u2014 Docker 2025 on openSUSE (what makes sense today)<\/h2>\n<p>It is the only supported way to run SQL Server 2025 on Leap. The image is <code data-no-translation=\"\">mcr.microsoft.com\/mssql\/server:2025-latest<\/code>. The host can be Leap, Tumbleweed, Ubuntu, or anything else \u2014 as long as it is x86-64 with Docker (or Podman). If Docker is not on Leap yet, the <a href=\"\/en\/2017\/08\/curso-de-docker-gratis\/\">Docker course<\/a> covers the basics; on recent Leap:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo zypper in docker\nsudo systemctl enable --now docker\nsudo usermod -aG docker \"$USER\"   # relogue depois\n<\/code><\/pre>\n<p>Start the container. The old variable <code data-no-translation=\"\">SA_PASSWORD<\/code> is deprecated \u2014 use <code data-no-translation=\"\">MSSQL_SA_PASSWORD<\/code>. The password must have at least 8 characters and three of the four classes (uppercase, lowercase, digit, symbol); otherwise the container starts and dies, and the reason only appears in <code data-no-translation=\"\">docker logs<\/code>.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">docker pull mcr.microsoft.com\/mssql\/server:2025-latest\n\ndocker run -e \"ACCEPT_EULA=Y\" \n  -e \"MSSQL_SA_PASSWORD=SuaSenhaForte_123\" \n  -p 1433:1433 --name sql1 --hostname sql1 \n  -v sql1data:\/var\/opt\/mssql \n  -d mcr.microsoft.com\/mssql\/server:2025-latest\n\ndocker ps\n# STATUS precisa ser Up. Se for Exited:\ndocker logs sql1\n<\/code><\/pre>\n<p>The volume <code data-no-translation=\"\">sql1data<\/code> keeps the data in <code data-no-translation=\"\">\/var\/opt\/mssql<\/code>. Without a volume, <code data-no-translation=\"\">docker rm<\/code> deletes the database. The image already includes <code data-no-translation=\"\">sqlcmd<\/code> 18:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">docker exec -it sql1 \/opt\/mssql-tools18\/bin\/sqlcmd \n  -S localhost -U sa -P 'SuaSenhaForte_123' -No\n<\/code><\/pre>\n<h2>Path 2 \u2014 native on Ubuntu 24.04 (SQL Server 2025)<\/h2>\n<p class=\"translation-block\">Anyone who can choose the OS and wants the engine under systemd, without a container, should use Ubuntu 24.04 (or 22.04) \/ RHEL 9\u201310. The <code>mssql-server<\/code> package, interactive setup, same password policy.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">curl -fsSL https:\/\/packages.microsoft.com\/keys\/microsoft.asc \n  | sudo gpg --dearmor -o \/usr\/share\/keyrings\/microsoft-prod.gpg\n\ncurl -fsSL https:\/\/packages.microsoft.com\/config\/ubuntu\/24.04\/mssql-server-2025.list \n  | sudo tee \/etc\/apt\/sources.list.d\/mssql-server-2025.list\n\nsudo apt-get update\nsudo apt-get install -y mssql-server\nsudo \/opt\/mssql\/bin\/mssql-conf setup\nsystemctl status mssql-server --no-pager\n<\/code><\/pre>\n<p>Tools on Ubuntu 24.04:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">curl -sSL -O https:\/\/packages.microsoft.com\/config\/ubuntu\/24.04\/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\nsudo apt-get update\nsudo apt-get install -y mssql-tools18 unixodbc-dev\necho 'export PATH=\"$PATH:\/opt\/mssql-tools18\/bin\"' >> ~\/.bashrc\nsource ~\/.bashrc\n<\/code><\/pre>\n<h2>Path 3 \u2014 native on SLES 15 (SQL Server 2022)<\/h2>\n<p>SLES 15 SP6 is still the home of the RPM. SQL Server 2022, not 2025. Enable the Desktop Applications and Development Tools modules in the SUSE Customer Center first \u2014 the package depends on them. Use XFS or ext4 for the disk.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo rpm --import https:\/\/packages.microsoft.com\/keys\/microsoft.asc\nsudo zypper addrepo -fc https:\/\/packages.microsoft.com\/config\/sles\/15\/mssql-server-2022.repo\nsudo zypper --gpg-auto-import-keys refresh\nsudo zypper install -y mssql-server\nsudo \/opt\/mssql\/bin\/mssql-conf setup\nsystemctl status mssql-server\n<\/code><\/pre>\n<p>Tools:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo zypper ar https:\/\/packages.microsoft.com\/config\/sles\/15\/prod.repo\nsudo zypper install -y mssql-tools18 unixODBC-devel glibc-locale-base\necho 'export PATH=\"$PATH:\/opt\/mssql-tools18\/bin\"' >> ~\/.bashrc\nsource ~\/.bashrc\n<\/code><\/pre>\n<p>Firewall, if connecting from outside:<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo zypper install -y firewalld\nsudo systemctl start firewalld\nsudo firewall-cmd --zone=public --add-port=1433\/tcp --permanent\nsudo firewall-cmd --reload\n<\/code><\/pre>\n<p>Pasting the <code data-no-translation=\"\">.repo<\/code> from SLES into Leap <em>still works sometimes<\/em> \u2014 and remains the same unofficial shortcut from 2017. It is not Microsoft support. Btrfs on Leap's root is the first obstacle.<\/p>\n<h2>sqlcmd and the first query<\/h2>\n<p class=\"translation-block\">Applies to both the container and the native package. The <code>-No<\/code> option prevents rejection of a self-signed certificate by <code>sqlcmd<\/code> 18.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sqlcmd -S localhost -U sa -P 'SuaSenhaForte_123' -No\n<\/code><\/pre>\n<pre data-no-translation=\"\"><code class=\"language-sql\" data-no-translation=\"\">CREATE DATABASE TestDB;\nSELECT Name FROM sys.databases;\nGO\nUSE TestDB;\nCREATE TABLE dbo.Inventory (\n    id INT,\n    name NVARCHAR(50),\n    quantity INT,\n    PRIMARY KEY (id)\n);\nINSERT INTO dbo.Inventory VALUES (1, 'banana', 150);\nINSERT INTO dbo.Inventory VALUES (2, 'orange', 154);\nGO\nSELECT * FROM dbo.Inventory WHERE quantity &gt; 152;\nGO\nQUIT\n<\/code><\/pre>\n<p>Good practices after the first login: create your own login, add it to <code data-no-translation=\"\">sysadmin<\/code> and disable <code data-no-translation=\"\">sa<\/code>. The password for <code data-no-translation=\"\">sa<\/code> in Docker appears in <code data-no-translation=\"\">ps<\/code> and in the container's environment \u2014 change it immediately in production.<\/p>\n<h2>How it worked in 2017 (Leap 42.2 \/ CTP 2.0)<\/h2>\n<p>The original gist, on Leap 42.2, called for 3,25 GB of RAM, XFS\/ext4, the SLES 12 repository, and the installer that no longer exists. It remains here as a record \u2014 do not run this on a current Leap installation.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">## OpenSUSE 42.2 64 bits, root \u2014 SQL Server vNext CTP 2.0\nzypper ar -fc https:\/\/packages.microsoft.com\/config\/sles\/12\/mssql-server.repo\nzypper --gpg-auto-import-keys refresh\nzypper in mssql-server\n\/opt\/mssql\/bin\/sqlservr-setup\n\nzypper ar -fc https:\/\/packages.microsoft.com\/config\/sles\/12\/prod.repo\nzypper --gpg-auto-import-keys refresh\nzypper in mssql-tools unixODBC-devel\nln -sfn \/opt\/mssql-tools\/bin\/sqlcmd \/usr\/local\/bin\/sqlcmd\nln -sfn \/opt\/mssql-tools\/bin\/bcp \/usr\/local\/bin\/bcp\n<\/code><\/pre>\n<p>The walkthrough from that time is in the <a href=\"https:\/\/gist.github.com\/jniltinho\/c67a9e85c651e187d2da2f0a813fe46a\">gist<\/a>.<\/p>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-release-notes-2025?view=sql-server-ver17\">SQL Server 2025 on Linux release notes<\/a> \u2014 platform matrix and the removal of SLES<\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/quickstart-install-connect-docker?view=sql-server-ver17\">Quickstart: container 2025<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver17\">Quickstart: Ubuntu 24.04 \/ 2025<\/a><\/li>\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/quickstart-install-connect-suse?view=sql-server-ver16\">Quickstart: SLES 15 \/ SQL Server 2022<\/a><\/li>\n<li><a href=\"\/en\/2017\/08\/curso-de-docker-gratis\/\">Free Docker course<\/a><\/li>\n<li><a href=\"\/en\/2026\/09\/vaultwarden-bitwarden-self-hosted\/\">Vaultwarden on Docker<\/a> \u2014 another self-hosted service using the same volume + reverse proxy approach<\/li>\n<li><a href=\"\/en\/2017\/04\/samba4-setup-opensuse\/\">Samba 4 on OpenSUSE<\/a><\/li>\n<\/ul>\n<p>SQL Server on Linux stopped being a novelty in 2017. What really changed is the distro list: Leap was left out, SLES stopped at 2022, and the honest shortcut for anyone sticking with the gecko is the 2025 container.<\/p>","protected":false},"excerpt":{"rendered":"<p>In 2017, Microsoft had just released SQL Server on Linux. The shortcut at the time was to paste the SLES 12 .repo into Leap 42.2 and run setup. Nine years later, the engine is the same \u2014 \u2026 <a title=\"Installing SQLServer on OpenSUSE\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2017\/04\/sql-server-linux-setup-opensuse\/\" aria-label=\"Read more about Instalando SQLServer no OpenSUSE\">Read more<\/a><\/p>","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,83,120],"tags":[156,14,4,85,90],"class_list":["post-144","post","type-post","status-publish","format-standard","hentry","category-linux","category-opensuse","category-servidores","tag-docker","tag-howto","tag-linux","tag-opensuse","tag-sqlserver"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=144"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":1313,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/144\/revisions\/1313"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}