在Linux上使用Microsoft SQL – 安装SQL

Microsoft SQL支持在Linux上部署已经有一段日子了,今天我们就来分享一下如何在Linux上使用Microsoft SQL 2017。

SQL Server 2017旨在处理开源数据和应用程序的异构环境。在本技术白皮书中,您将获得业界领先的关系数据库引擎的操作视图,重点是利用SQL Server功能以开源开发人员和IT专家需要和期望的方式提供强大的洞察力。除了现在的标准功能,如高级分析和机器智能,SQL Server 2017还提供业界领先的安全性以及与开源应用程序和工具的互操作性。

SQL Server 2017

1、微软官方文档描述的Linux平台为:Redhat、Ubuntu、SUSE、Docker。今天我们来分享一下如何在Centos7中安装SQL2017。由于Centos7属于Redhat的分支版本所以完全可以参考Redhat的相关说明文件。

测试环境使用root执行,但如果你是生产环境建议还是创建低权限账号使用。

2、Linux系统更新

yum update -y

3、下载Microsoft SQL Server 2017 or 2019 存储库配置文件

//SQL Server 2017 存储库配置文件
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo

//SQL Server 2019 存储库配置文件
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-preview.repo

4、安装SQL Server

yum install -y mssql-server

5、运行mssql-conf setup,此处需要注意提示,选择版本信息及设置SA密码,由于我们是测试,所以可以选择1、2、3。我们在Enter your edition(1-8): 输入1后回车。隐私&许可,输入YES。然后输入SA密码。建议使用复杂度密码。

/opt/mssql/bin/mssql-conf setup
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) Enterprise Core (PAID)
  8) 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-8): 1
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855864&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
Enter the SQL Server system administrator password: 此处输入SA密码,建议不要使用弱密码

6、输入密码后,Linux for SQL Server 2017就已经完成了安装,我们可以检查一下服务状态是否正常。我们看到服务状态正常可以正常使用了。

systemctl status mssql-server.service
在Linux上使用Microsoft SQL - 安装SQL

此文章为原创文章,作者:胖哥叨逼叨,如若转载,请与我联系并注明出处:https://www.pangshare.com/1681.htm

(2)
打赏 微信扫一扫 微信扫一扫
上一篇 2019年8月14日 下午3:23
下一篇 2019年8月16日 下午2:18

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

评论列表(1条)