如何在 centos 6.8 中安装 Microsoft SQL Server

如何在 centos 6.8 中安装 Microsoft SQL Server

我正在尝试在 centos 6.8 上安装 Microsoft SQL Server,我尝试了以下命令:

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

运行此命令后出现以下错误:

Error: Package: mssql-server-14.0.405.200-1.x86_64 (packages-microsoft-com-mssql-server)
Requires: openssl >= 1:1.0.1
Installed: openssl-1.0.1e-48.el6_8.4.x86_64 (@updates)
openssl = 1.0.1e-48.el6_8.4
Available: openssl-1.0.1e-48.el6.i686 (base)
openssl = 1.0.1e-48.el6
Available: openssl-1.0.1e-48.el6_8.1.i686 (updates)
openssl = 1.0.1e-48.el6_8.1
Available: openssl-1.0.1e-48.el6_8.3.i686 (updates)
openssl = 1.0.1e-48.el6_8.3
Error: Package: mssql-server-14.0.405.200-1.x86_64 (packages-microsoft-com-mssql-server)
Requires: systemd
Error: Package: mssql-server-14.0.405.200-1.x86_64 (packages-microsoft-com-mssql-server)
Requires: systemd-units
Error: Package: mssql-server-14.0.405.200-1.x86_64 (packages-microsoft-com-mssql-server)
Requires: numactl-libs
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

谁能帮我用上面的代码在centos 6.8上安装Microsft SQL Server?

答案1

您正在尝试在 CentOS6 服务器上安装为 RHEL7 构建的软件包。切换到 RHEL6 存储库,您应该能够安装 mssql-server 软件包,没有任何问题:

curl https://packages.microsoft.com/config/rhel/6/prod.repo > /etc/yum.repos.d/mssql-server.repo
sudo yum install -y mssql-server

编辑:据我所知,在packages.microsoft.com上,mssql-server仅适用于RHEL7(https://packages.microsoft.com/rhel/),可以正确安装的位置:

[root@d7200e620554 /]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

[root@d7200e620554 /]# curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   220  100   220    0     0    338      0 --:--:-- --:--:-- --:--:--   337

[root@d7200e620554 /]# yum install -y mssql-server
Loaded plugins: fastestmirror, ovl
base                                                                                                                            | 3.6 kB  00:00:00
extras                                                                                                                          | 3.4 kB  00:00:00
packages-microsoft-com-mssql-server                                                                                             | 2.9 kB  00:00:00
updates                                                                                                                         | 3.4 kB  00:00:00
(1/5): base/7/x86_64/group_gz                                                                                                   | 155 kB  00:00:00
(2/5): extras/7/x86_64/primary_db                                                                                               | 139 kB  00:00:01
(3/5): packages-microsoft-com-mssql-server/primary_db                                                                           | 6.1 kB  00:00:01
(4/5): base/7/x86_64/primary_db                                                                                                 | 5.6 MB  00:00:04
(5/5): updates/7/x86_64/primary_db                                                                                              | 3.8 MB  00:00:05
Determining fastest mirrors
 * base: mirrors.pidginhost.com
 * extras: mirrors.pidginhost.com
 * updates: mirrors.pidginhost.com
Resolving Dependencies
--> Running transaction check
---> Package mssql-server.x86_64 0:14.0.405.200-1 will be installed
--> Processing Dependency: openssl < 1:1.1.0 for package: mssql-server-14.0.405.200-1.x86_64
--> Processing Dependency: openssl >= 1:1.0.1 for package: mssql-server-14.0.405.200-1.x86_64
--> Processing Dependency: bzip2 for package: mssql-server-14.0.405.200-1.x86_64
--> Processing Dependency: numactl-libs for package: mssql-server-14.0.405.200-1.x86_64
--> Processing Dependency: gdb for package: mssql-server-14.0.405.200-1.x86_64
--> Running transaction check
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
---> Package gdb.x86_64 0:7.6.1-94.el7 will be installed
---> Package numactl-libs.x86_64 0:2.0.9-6.el7_2 will be installed
---> Package openssl.x86_64 1:1.0.1e-60.el7_3.1 will be installed
--> Processing Dependency: make for package: 1:openssl-1.0.1e-60.el7_3.1.x86_64
--> Running transaction check
---> Package make.x86_64 1:3.82-23.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================
 Package                       Arch                    Version                              Repository                                            Size
=======================================================================================================================================================
Installing:
 mssql-server                  x86_64                  14.0.405.200-1                       packages-microsoft-com-mssql-server                  142 M
Installing for dependencies:
 bzip2                         x86_64                  1.0.6-13.el7                         base                                                  52 k
 gdb                           x86_64                  7.6.1-94.el7                         base                                                 2.4 M
 make                          x86_64                  1:3.82-23.el7                        base                                                 420 k
 numactl-libs                  x86_64                  2.0.9-6.el7_2                        base                                                  29 k
 openssl                       x86_64                  1:1.0.1e-60.el7_3.1                  updates                                              713 k

Transaction Summary
=======================================================================================================================================================
Install  1 Package (+5 Dependent packages)

Total download size: 145 M
Installed size: 151 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/bzip2-1.0.6-13.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY6 MB  00:01:55 ETA
Public key for bzip2-1.0.6-13.el7.x86_64.rpm is not installed
(1/6): bzip2-1.0.6-13.el7.x86_64.rpm                                                                                            |  52 kB  00:00:00
(2/6): numactl-libs-2.0.9-6.el7_2.x86_64.rpm                                                                                    |  29 kB  00:00:01
(3/6): gdb-7.6.1-94.el7.x86_64.rpm                                                                                              | 2.4 MB  00:00:01
(4/6): make-3.82-23.el7.x86_64.rpm                                                                                              | 420 kB  00:00:01
Public key for openssl-1.0.1e-60.el7_3.1.x86_64.rpm is not installed                                                 ] 1.3 MB/s | 3.4 MB  00:01:49 ETA
(5/6): openssl-1.0.1e-60.el7_3.1.x86_64.rpm                                                                                     | 713 kB  00:00:01
warning: /var/cache/yum/x86_64/7/packages-microsoft-com-mssql-server/packages/mssql-server-14.0.405.200-1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
Public key for mssql-server-14.0.405.200-1.x86_64.rpm is not installed
(6/6): mssql-server-14.0.405.200-1.x86_64.rpm                                                                                   | 142 MB  00:00:47
-------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                  3.0 MB/s | 145 MB  00:00:47
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <[email protected]>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-3.1611.el7.centos.x86_64 (@CentOS)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Retrieving key from https://packages.microsoft.com/keys/microsoft.asc
Importing GPG key 0xBE1229CF:
 Userid     : "Microsoft (Release signing) <[email protected]>"
 Fingerprint: bc52 8686 b50d 79e3 39d3 721c eb3e 94ad be12 29cf
 From       : https://packages.microsoft.com/keys/microsoft.asc
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : numactl-libs-2.0.9-6.el7_2.x86_64                                                                                                   1/6
  Installing : 1:make-3.82-23.el7.x86_64                                                                                                           2/6
  Installing : 1:openssl-1.0.1e-60.el7_3.1.x86_64                                                                                                  3/6
  Installing : gdb-7.6.1-94.el7.x86_64                                                                                                             4/6
  Installing : bzip2-1.0.6-13.el7.x86_64                                                                                                           5/6
  Installing : mssql-server-14.0.405.200-1.x86_64                                                                                                  6/6

+--------------------------------------------------------------------------+
| Please run sudo /opt/mssql/bin/mssql-conf setup to complete the setup of |
|                      Microsoft(R) SQL Server(R).                         |
+--------------------------------------------------------------------------+

  Verifying  : 1:openssl-1.0.1e-60.el7_3.1.x86_64                                                                                                  1/6
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                                                                           2/6
  Verifying  : gdb-7.6.1-94.el7.x86_64                                                                                                             3/6
  Verifying  : mssql-server-14.0.405.200-1.x86_64                                                                                                  4/6
  Verifying  : 1:make-3.82-23.el7.x86_64                                                                                                           5/6
  Verifying  : numactl-libs-2.0.9-6.el7_2.x86_64                                                                                                   6/6

Installed:
  mssql-server.x86_64 0:14.0.405.200-1

Dependency Installed:
  bzip2.x86_64 0:1.0.6-13.el7              gdb.x86_64 0:7.6.1-94.el7       make.x86_64 1:3.82-23.el7       numactl-libs.x86_64 0:2.0.9-6.el7_2
  openssl.x86_64 1:1.0.1e-60.el7_3.1

Complete!

相关内容