sqlserver安装失败_Centos7.7系统下安装SQL Server 2019

61387fc62f7689727c89ee4f9063f3ed.png

e01f3ac3377747ce1a0348fb736c9d0c.png

SQL Server 2019 为所有数据工作负载带来了创新的安全性和合规性功能、业界领先的性能、任务关键型可用性和高级分析,现在还支持内置的大数据。

准备工作

系统版本:Centos7.7 ,内存4G(SQL Server内存要求至少2G),硬盘40G,1核CPU SQL Server版本:SQL Server 2019,下载地址 SQL Server Management Studio 版本:V18.4,安装在windows客户端下载地址,Windows 2008R2(64位)或Windows8.1(64位)以上

关闭SELINUX

[root@localhost ~]# sed -i '/^SELINUX/s/enforcing/disabled/g' /etc/selinux/config && setenforce 0

添加软件源并安装依赖包

[root@localhost ~]# curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/msprod.repo[root@localhost ~]# yum -y install mssql-tools unixODBC-devel bzip2 gdb libsss_nss_idmap cyrus-sasl cyrus-sasl-gssapi

e05f0446ea5ad4295bc5e3559da088b7.png

安装SQL Server2019

下载文章上面提供的SQL Server2019,上传到服务器并安装

[root@localhost ~]# rpm -ivh mssql-server-15.0.4003.23-3.x86_64.rpmPreparing...                          ################################# [100%]Updating / installing...   1:mssql-server-15.0.4003.23-3      ################################# [100%]+--------------------------------------------------------------+Please run 'sudo /opt/mssql/bin/mssql-conf setup'to complete the setup of Microsoft SQL Server+--------------------------------------------------------------+

运行初始化配置

[root@localhost ~]# /opt/mssql/bin/mssql-conf setupusermod: no changesChoose 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 athttps://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409Use of PAID editions of this software requires separate licensing through aMicrosoft Volume Licensing program.By choosing a PAID edition, you are verifying that you have the appropriatenumber of licenses in place to install and run this software.Enter your edition(1-8): 3 		#这里选择了Express版本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=0x409The privacy statement can be viewed at:https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409Do you accept the license terms? [Yes/No]:Yes	#输入Yes接受许可条目Enter the SQL Server system administrator password: 		#设置SA管理员密码Confirm the SQL Server system administrator password:Configuring SQL Server...The licensing PID was successfully processed. The new edition is [Express Edition].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.Setup has completed successfully. SQL Server is now starting.

添加环境变量

[root@localhost ~]# echo 'export PATH=$PATH:/opt/mssql-tools/bin' > /etc/profile.d/mssql.sh[root@localhost ~]# source !$source /etc/profile.d/mssql.sh

防火墙添加服务

[root@localhost ~]# firewall-cmd --permanent --add-service=mssqlsuccess[root@localhost ~]# firewall-cmd --reloadsuccess
命令工具连接测试
[root@localhost ~]# sqlcmd -S localhost -U saPassword:# 显示系统数据库1> select name,database_id from sys.databases;# 执行2> goname                                                                                                                             database_id-------------------------------------------------------------------------------------------------------------------------------- -----------master                                                                                                                                     1tempdb                                                                                                                                     2model                                                                                                                                      3msdb                                                                                                                                       4(4 rows affected)# 查看软件版本1> SELECT @@VERSION2> go------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Microsoft SQL Server 2019 (RTM-CU1) (KB4527376) - 15.0.4003.23 (X64)	Dec  6 2019 14:53:33	Copyright (C) 2019 Microsoft Corporation	Express Edition (64-bit) on Linux (CentOS Linux 7 (Core))(1 rows affected)1>

0e9e887a9950ff05df66a1dba509a0a7.png

在客户端连接数据库

安装上面提供的SSMS管理软件,安装完成之后搜索”ssms”,打开该管理软件1491f5d91c05b57a1e000ce659cb88dd.png输入服务器地址,身份验证选择“SQL Server身份验证”,输入用户名密码,然后连接。0938644f59df84fe0239da667b2d7e72.png查看一下SQL Server版本30bbcdf52fbb552b442252fa6aabed39.png

总   结

内存设置为2G的时候,安装SQL Server2019会出现安装失败,提示内存最少为2000M,所以设置不要低于2G内存,安装还是很简单的。

本文原创地址:https://www.linuxprobe.com/centos7-instal-mssql-2019.html编辑:逄增宝,审核员:逄增宝

b93d6dcce3735cbd8e329078e22b75bc.png

如果喜欢这位作者的文章,点点在看支持一下~

68162dcac0d2fa7fbe49c4749b3d0ab2.png

官方站点:www.linuxprobe.com

 Linux命令大全:www.linuxcool.com

Linux系统下载站:www.linuxdown.com

32c367f34115f0897218a30c9457287f.png

刘遄老师QQ:5604922

Linux技术交流群:193666693

(新群,火热加群中……)

书籍在线学习(电脑阅读效果佳)

http://www.linuxprobe.com/chapter-00.html

    想要学习Linux系统的读者可以点击按钮来了解书籍《Linux就该这么学》,同时也非常适合专业的运维人员阅读,成为辅助您工作的高价值工具书!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值