Create C# apps using SQL Server on SLES
In this section, you will get SQL Server 2017 on SUSE Linux Enterprise Server (SLES). After that you will install the necessary dependencies to create .NET Core apps with SQL Server.
Step 1.1 Install SQL Server
Note: To ensure optimal performance of SQL Server, your machine should have at least 4 GB of memory.
-
Register the Microsoft Linux repository and add they keys
sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/12/mssql-server.repo sudo zypper --gpg-auto-import-keys refresh
-
Install SQL Server
sudo zypper update sudo zypper install mssql-server
-
Setup your SQL Server
sudo /opt/mssql/bin/mssql-conf setup
Microsoft(R) SQL Server(R) Setup
To abort setup at anytime, press Ctrl-C.
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:
Please enter a password for the system administrator (SA) account:
Please confirm the password for the system administrator (SA) account:
You now have SQL Server running locally on your SLES machine! Check out the next section to continue installing prerequisites.
Step 1.2 Install .NET Core
If you already have .NET Core installed on your machine, skip this step. Otherwise, install it using the following commands.
sudo zypper install libunwind libicu
curl -sSL -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-preview2-linux-x64-bin
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
You have successfully installed .NET Core on your SLES machine. You now have everything you need to start writing your C# apps with SQL Server!
Have Questions?
Happy to help! You can find us on GitHub, MSDN Forums, and StackOverflow. We also monitor the #SQLServerDev hashtag on Twitter.