MSSQL for Linux 安装指南

MSSQL for Linux 安装指南

1、安装

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

[[email protected] etc]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# ls
CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentOS-Media.repo CentOS-Sources.repo CentOS-Vault.repo mssql-server.repo

2、安装MSSQL

yum install mssql-server

3、安装完成后,配置SETUP

[[email protected] /]# /opt/mssql/bin/mssql-conf setup

选择 SQL Server 的一个版本:
1) Evaluation (免费,无生产许可,180 天限制)
2) Developer (免费,无生产许可)
3) Express (免费)
4) Web (付费版)
5) Standard (付费版)
6) Enterprise (付费版)
7) Enterprise Core (付费版)
8) 我通过零售渠道购买了许可证并具有要输入的产品密钥。

可在以下位置找到有关版本的详细信息:
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x804

使用此软件的付费版本需要通过以下途径获取单独授权
Microsoft 批量许可计划。
选择付费版本即表示你具有适用的
要安装和运行此软件的就地许可证数量。

输入版本(1-8): 2
可以在以下位置找到此产品的许可条款:
/usr/share/doc/mssql-server 或从以下位置下载:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x804

可以从以下位置查看隐私声明:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x804

接受此许可条款吗? [Yes/No]:yes


选择 SQL Server 的语言:
(1) English
(2) Deutsch
(3) Español
(4) Français
(5) Italiano
(6) 日本語
(7) ???
(8) Português
(9) Русский
(10) 中文 – 简体
(11) 中文 (繁体)
输入选项 1-11:1

输入 SQL Server 系统管理密码:
确认 SQL Server 系统管理员密码:
正在配置 SQL Server...

ForceFlush is enabled for this instance.
ForceFlush feature is enabled for log durability.
Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service.
安装程序已成功完成。SQL Server 正在启动

4、验证服务是否正常开启

[[email protected] /]# systemctl status mssql-server● mssql-server.service - Microsoft SQL Server Database Engine   Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)   Active: active (running) since 一 2019-05-20 11:16:37 CST; 47s ago     Docs: https://docs.microsoft.com/en-us/sql/linux Main PID: 26015 (sqlservr)   CGroup: /system.slice/mssql-server.service           ├─26015 /opt/mssql/bin/sqlservr           └─26037 /opt/mssql/bin/sqlservr5月 20 11:16:41 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:41.51 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434].5月 20 11:16:41 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:41.51 Server      Dedicated admin connection support was established for listening locally on port 1434.5月 20 11:16:41 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:41.51 spid20s     SQL Server is now ready for client connections. This is an informational message; no user action is required.5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:41.99 spid9s      Starting up database tempdb.5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:42.24 spid9s      The tempdb database has 1 data file(s).5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:42.28 spid16s     The Service Broker endpoint is in disabled or stopped state.5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:42.28 spid16s     The Database Mirroring endpoint is in disabled or stopped state.5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:42.36 spid16s     Service Broker manager has started.5月 20 11:16:42 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:42.43 spid5s      Recovery is complete. This is an informational message only. No user action is required.5月 20 11:16:45 localhost.localdomain sqlservr[26015]: 2019-05-20 11:16:45.31 spid33s     The activated proc [dbo].[sp_syspolicy_events_reader] running on queue msdb.dbo.syspolicy_event_queue output the following:  Transaction (Proc...Hint: Some lines were ellipsized, use -l to show in full.

5、开启远程访问,将开放端口1433

[[email protected] /]# firewall-cmd --zone=public --add-port=1433/tcp --permanentsuccess

6、测试连接正常使用。

免责声明:本网信息来自于互联网,目的在于传递更多信息,并不代表本网赞同其观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,并请自行核实相关内容。本站不承担此类作品侵权行为的直接责任及连带责任。如若本网有任何内容侵犯您的权益,请及时联系我们,本站将会在24小时内处理完毕。
相关文章
返回顶部