SQL Server 2019 for Linux – 安装SQL2019 on Linux

部署前提

关闭防火墙服务(生产环境建议开放对应通信端口,不要关闭防火墙及相关安全服务)

# 检查防火墙状态
systemctl status firewalld
# 停止防火墙服务
systemctl stop firewalld
#关于防火墙服务
systemctl disable firewalld

开放防火墙端口

firewall-cmd --zone=public --add-port=1433/tcp --permanent
firewall-cmd --reload

关闭selinux服务

# vim /etc/selinux/config
将SELINUX=enforcing 变更为 SELINUX=disabled

下载 Microsoft SQL Server 2019 Red Hat 存储库配置文件

curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo

运行命令安装SQL Server 2019

yum install -y mssql-server

运行 mssql-conf setup,按照提示设置 SA 密码并选择版本。

/opt/mssql/bin/mssql-conf setup
usermod: no changes
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) - CPU Core utilization restricted to 20 physical/40 hyperthreaded
7) Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum
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=2109348&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): 6
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=2104294&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:Pass@123

Confirm the SQL Server system administrator password:Pass@123

安装完成后,检查服务是否正常启动

systemctl status mssql-server

现在我们就已经安装完成,可以在Linux上使用SQL Server 2019啦。

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

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 2020年10月2日 上午12:49
下一篇 2020年10月19日 下午4:44

相关推荐

发表回复

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