openSUSE

How To Install Microsoft SQL Server on openSUSE

Install Microsoft SQL Server on openSUSE

In this tutorial, we will show you how to install Microsoft SQL Server on openSUSE. Microsoft SQL Server is a robust and widely-used database management system that supports a variety of transaction processing, business intelligence, and analytics applications. With the release of SQL Server for Linux, users can now leverage the performance and security features of SQL Server on their preferred Linux distributions, including openSUSE.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Microsoft SQL Server on openSUSE.

Prerequisites

  • A server running one of the following operating systems: openSUSE Leap 15.x or Tumbleweed.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. openSUSE provides the Terminal application for this purpose. It can be found in your Applications menu.
  • You’ll need an active internet connection to download Microsoft SQL and its dependencies.
  • You’ll need administrative (root) access or a user account with sudo privileges.

Install Microsoft SQL Server on openSUSE

Step 1. Before installing any new software, it’s always a good idea to update your system to ensure all existing packages are up-to-date. This ensures that your system has the latest security patches and dependencies needed for a smooth installation:

sudo zypper refresh
sudo zypper update

Step 2. Installing Microsoft SQL Server on openSUSE.

The first step involves adding the Microsoft SQL Server 2019 repository to your system’s package manager. This repository contains the SQL Server packages and dependencies required for installation:

sudo zypper addrepo -fc https://packages.microsoft.com/config/sles/15/mssql-server-2019.repo
sudo zypper --gpg-auto-import-keys refresh

Next, import the Microsoft package signing key to ensure the authenticity of the packages:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

With the repository in place, you can now install SQL Server using the following command:

sudo zypper install mssql-server

Step 3. Configuration.

After the installation completes, run the SQL Server setup utility to configure your new SQL Server installation. This includes setting the SA (system administrator) password and choosing the edition of SQL Server you wish to install (Developer, Express, or Evaluation are freely licensed):

sudo /opt/mssql/bin/mssql-conf setup

Step 4. Installing SQL Server Command-Line Tools.

For better management of SQL Server, install the command-line tools sqlcmd and bcp:

sudo zypper install mssql-tools unixODBC-devel

To make these tools easily accessible, add them to your PATH:

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
source ~/.bash_profile

Check that the SQL Server is running properly:

sudo systemctl status mssql-server

Connect to your SQL Server instance using sqlcmd:

sqlcmd -S localhost -U SA -P '<YourStrong-Passw0rd>'

Step 5. Creating a New Database.

Once SQL Server is installed and configured, you can create a new database using the sqlcmd utility:

sqlcmd -S localhost -U SA -P '<YourStrong-Passw0rd>'

At the sqlcmd prompt, create a new database named TestDB:

CREATE DATABASE TestDB;
GO

To verify the database creation, list all databases on your server:

SELECT Name FROM sys.databases;
GO

Exit sqlcmd:

QUIT

Congratulations! You have successfully installed Microsoft SQL. Thanks for using this tutorial for installing the Microsoft SQL Server on your openSUSE system. For additional or useful information, we recommend you check the official Microsoft website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button