Server-CentOS7.4脱机安装SQL-2017 (server是什么意思)

教程大全 2025-07-16 17:49:14 浏览

SQL Server on Linux也发布一段时间了,官方上支持Red Hat, SUSE, Ubuntu。手上没有以上Linux版本,选用了与Red Hat最接近的Centos7.4来进行安装和测试。

1. 环境

Linux: CentOS Linux release 7.4.1708 (Core)Memory: 4 GBSQL Server: SQL Server 2017 (RC2) – 14.0.900.75 (X64)

2. 安装mssql-server

2.1 下载rpm包

[root@linuxidc /opt]# mkdir -p /opt/sqlserver2017

[root@linuxidc /opt]# cd /opt/sqlserver2017/

[root@linuxidc /opt]# wget

2.2 yum安装

[root@linuxidc /opt/sqlserver2017]# yum localinstall mssql-server-14.0.900.75-1.x86_64.rpm Loaded plugins: fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Examining mssql-server-14.0.900.75-1.x86_64.rpm: mssql-server-14.0.900.75-1.x86_64

Marking mssql-server-14.0.900.75-1.x86_64.rpm to be installed

Resolving Dependencies

–> Running transaction check

—> Package mssql-server.x86_64 0:14.0.900.75-1 will be installed

–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size

Installing:

mssql-server x86_64 14.0.900.75-1 /mssql-server-14.0.900.75-1.x86_64 870 M

Transaction Summary

Install 1 Package

Total size: 870 M

Installed size: 870 M

Is this ok [y/d/N]:

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : mssql-server-14.0.900.75-1.x86_64 1/1

Please run ‘sudo /opt/mssql/bin/mssql-conf setup’

to complete the setup of Microsoft SQL Server

Verifying : mssql-server-14.0.900.75-1.x86_64 1/1

Installed:

mssql-server.x86_64 0:14.0.900.75-1

2.3 配置

[root@linuxidc /opt/mssql/bin]# /opt/mssql/bin/mssql-conf setup

The license terms for this product can be found in

/usr/share/doc/mssql-server or downloaded from:

The privacy statement can be viewed at:

Do you accept the license terms? [Yes/No]:

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)

7) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at

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-7): 2

Enter the SQL Server system administrator password:

Confirm the SQL Server system administrator password:

Configuring SQL Server…

This is an evaluation version. There are [40] days LEFT in the evaluation period.

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.注意评估版本有使用期限。

2.4 验证服务

[root@linuxidc /opt/mssql/bin]# systemctl status mssql-server

● mssql-server.service – Microsoft SQL Server>active (running)since Thu 2017-12-14 18:25:03 CST; 1min 23s ago

Docs:

Main PID: 56504 (sqlservr)

CGroup: /system.slice/mssql-server.service

├─56504 /opt/mssql/bin/sqlservr

└─56525 /opt/mssql/bin/sqlservr

Dec 14 18:25:10 linuxidc sqlservr[56504]: 2017-12-14 18:25:10.36 Server Server is listening on [ ::1 1434].

Dec 14 18:25:10 linuxidc sqlservr[56504]: 2017-12-14 18:25:10.37 Server Server is listening on [ 127.0.0.1 1434].

Dec 14 18:25:10 linuxidc sqlservr[56504]: 2017-12-14 18:25:10.37 Server Dedicated admin connection support was established for listening locally on port 1434.

Dec 14 18:25:10 linuxidc sqlservr[56504]: 2017-12-14 18:25:10.38 spid19s SQL Server is now ready for client connections. This is an informational message; … required.

Dec 14 18:25:10 linuxidc sqlservr[56504]: 2017-12-14 18:25:10.42 spid9s Starting up>3. 安装 sqlcmd 和 bcp SQL Server 命令行工具

3.1 下载

wgetHTTPs://packages.microsoft.com/rhel/7.3/prod/mssql-tools-14.0.5.0-1.x86_64.rpm

3.2 安装

yum localinstall msodbcsql-13.1.6.0-1.x86_64.rpm

yum localinstall mssql-tools-14.0.5.0-1.x86_64.rpm

3.3 添加到环境变量

[root@linuxidc /opt]# echo ‘export PATH=”$PATH:/opt/mssql-tools/bin”‘ >> ~/.bash_profile

CentOS7.4脱机安装SQL

[root@linuxidc /opt]# source ~/.bash_profile

[root@linuxidc /opt]# echo ‘export PATH=”$PATH:/opt/mssql-tools/bin”‘ >> ~/.bashrc

[root@linuxidc /opt]# source ~/.bashrc

3.4 本地连接

[root@linuxidc /opt/mssql/bin]# sqlcmd -S localhost -U sa

1> select name from sys.databases;

(5 rows affected)

1>create>3.5 退出

4. 安装SQL Server Agent

4.1 下载

wget安装

[root@linuxidc /opt/sqlserver2017]# yum localinstall mssql-server-agent-14.0.900.75-1.x86_64.rpm

Loaded plugins: fastestmirror, langpacks

Repository base is listed more than once in the configuration

Repository updates is listed more than once in the configuration

Repository extras is listed more than once in the configuration

Repository centosplus is listed more than once in the configuration

Examining mssql-server-agent-14.0.900.75-1.x86_64.rpm: mssql-server-agent-14.0.900.75-1.x86_64

Marking mssql-server-agent-14.0.900.75-1.x86_64.rpm to be installed

Resolving Dependencies

–> Running transaction check

—> Package mssql-server-agent.x86_64 0:14.0.900.75-1 will be installed

–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size

Installing:

mssql-server-agent x86_64 14.0.900.75-1 /mssql-server-agent-14.0.900.75-1.x86_64 8.9 M

Transaction Summary

Install 1 Package

Total size: 8.9 M

Installed size: 8.9 M

Is this ok [y/d/N]:

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

Installing : mssql-server-agent-14.0.900.75-1.x86_64 1/1

Please restart mssql-server to enable Microsoft SQL Server Agent.

Verifying : mssql-server-agent-14.0.900.75-1.x86_64 1/1

Installed:

mssql-server-agent.x86_64 0:14.0.900.75-1

5. 在Windows上使用SSMS连接数据库

Figure-1:SSMS连接Linux下的数据库

Figure-2:查询版本信息

 (RC2) .::)  Linux (CentOS Linux  (Core))

Figure-3:查询数据

发现Red Gate部分功能不能使用。rpm包安装无法指定安装目录。

6. 参考


怎样单独安装SQL Server 2008帮助文档

重新处理:选择“配置工具”———“SQL server安装中心”,然后选择安装,有选择的安装,将帮助文档选择安装即可,或者维护时候也可以

ERP系统安装失败是怎样回事

ERP在安装进程中的毛病,多是由于服务器系统条件和外围软件条件致使的安装毛病,所以在安装时尽可能依照安装手册说明进行安装。 第1 ,请确认你的操作系统在安装时没有系统文件丢失的情况,由于这会致使系统的1些服务没法启动。 第2,由于ERP是1款基于B/S结构的ERP系统,所以请确认你的服务器安装了iis6或以上版本。 第3,请确认你的电脑安装了 framework2.0及SQL Server2005(建议用企业版)另外,某些用户的电脑上安装了Sql Server2005后,在安装魁特ERP的进程提示“系统没有安装SQL Server或未启动服务”,当遇到这样的情况时,首先应当确认你的sql服务已启动,然后重新尝试安装。 如果肯定Sql正确安装同时启动服务,你可以修改计算机名重启电脑,再进行安装。

怎样彻底删除sql留在电脑注册表的信息数据

1、将Program files下的SQL安装目录删除(此处如果有重要的数据,请先备份)C:Program FilesMicrosoft SQL Server80Tools。 C:Program FilesMicrosoft SQL ServerMSSQL。 2、注册表中的相关信息删除:HKEY_LOCAL_macHINESOFTWAREMicrosoftMSSQLServer。 HKEY_LOCAL_MACHINESystemCurrentControlSetServicesMSDTC。 3、HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager中找到PendingFileRenameOperations项目,并删除它。 这样就可以清除安装暂挂项目。 4、HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionsetup删除ExceptionComponents这个项目下的内容可能很多,只有在上面几个办法不行的情况下,使用此方法(注意不要全部删除)删除内容前先看下内容说明5、Windows目录中的文件,该文件列出了安装程序所执行的操作的详细信息,并包含安装期间遇到的所有错误。 通过检查该文件,可以详细了解安装在什么地方失败、为什么失败。 6、SQL安装的时的错误信息保存在一个叫Errorlog的日志文件中,默认情况下该文件位于Program FilesMicrosoft SQL ServerMssqlLog目录中。 该错误日志包含安装程序试图启动SQL-Server时SQL-Server所遇到的错误,这些信息可以帮助您深入检查错误原因。 7、需要检查的另一个组件是Microsoft数据访问组件(MDAC)安装程序,它作为SQL-Server2000安装程序的一部分启动。 SQL-Server2000安装程序会安装MDAC2.6。 MDAC安装程序会创建名为的单独的日志文件;您可以查看此日志文件并确保MDAC安装程序没有出现问题。

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐