In this post, I will demonstrate how to install SQL Server 2017 on Red Hat Enterprise Linux.
I will describe all the process of installation in detail point of view. I have checked a lot of blogs and posts in regards to installing SQL Server on Linux, but most of them didn't mention what does means that command or parameters in command detailly.
System requirements:
Red Hat Enterprise Linux - 7.3 and above
RAM Memory - 2 GB
File System - XFS or EXT4
Disk space - Minimum 6 GB
Processor - 2 GHz | 2 Cores | x64-compatible only
“The main reason why I write this post, I would like to describe in more detail than on other posts and blogs.”
First of all, you have to switch to root user:
The following command will download SQL Server Red Hat repository file with configuration:
Note:
curl - This command get file using URL syntax.
-o - Parameter -o like --output means write output to <file> instead of stdout.
/etc/yum.repos.d/mssql-server.repo - The YUM repository will be saved in /etc/yum.repos.d folder from this url https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
Next step is installation of SQL Server 2017 on RHEL. The command is following:
Note:
yum - The Yellowdog Updater, Modified which using RPM Package Manager in RHEL.
install -y - Parameter -y means "YES", I agree with installation of mssql-server
This command includes a couple of process:
Download binary RPM package file
Creates User and Group "mssql"
Extract and Install SQL Server binaries
Register SQL Server like system service "mssql-server"
As you can see istallation has been successfully and you can see in output thse section below:
+--------------------------------------------------------------+
Please run 'sudo /opt/mssql/bin/mssql-conf setup'
to complete the setup of Microsoft SQL Server
+--------------------------------------------------------------+
So, next command will be:
This setup will provide following steps:
Extract System databases
Execute sqlservr that provide post install configuration steps
After executing, you have to choose edition of SQL Server as you can see below:
Press number 2 for "Developer Editon"
Then write Yes to accept End-User Licensing Agreement(EULA)
And last action si setup of SysAdmin password
Password must have at least 8 characters and must contain:
Capital letter
Lowercase letter
Numbers
Specidif symbols
As you can see our SQL Server has been installed.
In order to able to run query via sqlcmd tools, we have to install package for tools and ODBC, the command is following:
This command also provide downloading tools with configuration file.
For installing of tools run following command:
Then confirm "YES" and again "YES". And installations is completed.
This package will install:
Command line tool
SQLCMD tool on linux that uses ODBC
The last step is modifying PATH in order to we don't have to write full path for the run tool.
Command for put tool to PATH is following:
Comments