SQL Server/Linux – Install SQL Server 2017 on Linux

Microsoft document: Install SQL Server on Linux

[root@oralintest ~]# curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server.repo

[root@oralintest ~]# yum install mssql-server
...
Installed:
mssql-server.x86_64 0:14.0.900.75-1

Complete!
[root@oralintest ~]# /opt/mssql/bin/mssql-conf setup
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=852741&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

Do you accept the license terms? [Yes/No]:Yes

Choose an edition of SQL Server:
  1) Evaluation (free, no production use rights, 180-day limit)
  2) Developer (free, no production use rights)
  3) Express (free)
  4) Web (PAID)
  5) Standard (PAID)
  6) Enterprise (PAID)
  7) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-7): 1
Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...

This is an evaluation version.  There are [90] days left in the evaluation period.
The licensing PID was successfully processed. The new edition is [Enterprise Evaluation Edition].
Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service.
Setup has completed successfully. SQL Server is now starting.
[root@oralintest ~]#

[root@oralintest ~]# curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo

[root@oralintest ~]# yum install -y mssql-tools unixODBC-devel
...
Installing : msodbcsql-13.1.9.1-1.x86_64                                                                                                                                 2/4
...
Installed:
  mssql-tools.x86_64 0:14.0.6.0-1                                                     unixODBC-devel.x86_64 0:2.3.1-11.el7

[root@oralintest ~]# export PATH="$PATH:/opt/mssql-tools/bin"
[root@oralintest ~]# firewall-cmd --zone=public --add-port=1433/tcp --permanent
success
[root@oralintest ~]# firewall-cmd --reload
success
[root@oralintest ~]# sqlcmd -S localhost -U SA
Password:
1> use master;
2> go
Changed database context to 'master'.
1> select @@version
2> go
                                                                                                                                                                               
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2017 (RC2) - 14.0.900.75 (X64)
        Jul 27 2017 08:53:49
        Copyright (C) 2017 Microsoft Corporation
        Enterprise Evaluation Edition (64-bit) on Linux (Oracle Linux Server 7.4)                                                                                              

(1 rows affected)



One thought on “SQL Server/Linux – Install SQL Server 2017 on Linux

  1. Pingback: iPhone Heart Data - Export and Import into SQL Server for analysis - dbafox

Leave a Reply

Your email address will not be published. Required fields are marked *