如何在CentOS 8上安装Microsoft SQL Server
admin
2023-07-31 07:03:16
0次

Microsoft-SQL-Server-1Microsoft-SQL-Server-1在CentOS 8上安装Microsoft SQL Server

步骤1.首先,让我们首先确保您的系统是最新的。

sudo dnf clean all
sudo dnf update

步骤2.在CentOS 8上安装Microsoft SQL Server。

我们需要添加SQL Server 2019存储库:

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

接下来,运行以下命令来安装SQL Server:

sudo dnf install mssql-server

软件包安装完成后,运行安装程序并按照提示设置SA密码并选择您的版本:mssql-conf

$ /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.

# select an edition you\'d like to use
Enter your edition(1-8): 2
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

配置完成后,请验证该服务正在运行,并且应该启动该服务并将其设置为在启动时启动:

sudo systemctl status mssql-server.service 
sudo systemctl is-enabled mssql-server.service

步骤3.为MS SQL配置防火墙。

默认的SQL Server端口是TCP1433。如果您使用FirewallD作为防火墙,则可以使用以下命令:

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

步骤4.连接到MS SQL Server。

安装完成后,使用以下命令连接到MS SQL服务器:

sqlcmd -H 127.0.0.1 -U sa
Password: 
1>

sqlcmd 带有用于SQL Server名称(-S),用户名(-U)和密码(-P)的参数。

有关其他帮助或有用信息,我们建议您检查Microsoft SQL Server官方网站。

相关内容

热门资讯

Windows 11 和 10... Windows 11/10 文件夹属性中缺少共享选项卡 – 已修复 1.检查共享选项卡是否可用 右键...
事件 ID 7034:如何通过... 点击进入:ChatGPT工具插件导航大全 服务控制管理器 (SCM) 负责管理系统上运行的服务的活动...
Radmin VPN Wind... Radmin VPN 是一款免费且用户友好的软件,旨在牢固地连接计算机以创建一个有凝聚力的虚拟专用网...
Hive OS LOLMine... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
Hive OS 新建飞行表的方... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
如何在 Windows 11 ... 在对 Windows 注册表编辑器进行任何更改之前,强烈建议备份您的注册表设置。如果出现问题,您始终...
Hive OS 部署 PXE ... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
如何在Instagram上扫描... 如何在Instagram上扫描名称标签/ QR? 总而言之,您可以通过大约四种不同的方法来扫描这些I...
Hive OS A卡超频VII... 目前不清退的交易所推荐: 1、全球第二大交易所OKX欧意 国区邀请链接: https://www.m...
如何修复 Steam 内容文件... Steam 内容文件锁定是当您的 Steam 文件无法自行更新时出现的错误。解决此问题的最有效方法之...