在Red Hat Enterprise Linux 7.3上安装SQL Server 2017
必要条件:
1、在此快速安装过程中,您需要安装SQL Server 2017或SQL Server 2019上Red Hat Enterprise Linux (RHEL) 7.3 +。然后使用sqlcmd创建第一个数据库连接以及运行查询。
2、必须使用RHEL 7.3或7.4且必须拥有至少2GB的内存。如果以前已安装CTP或SQL Server 2017的RC版本,必须在执行以下步骤之前删除旧存储库。
在Red Hat Enterprise Linux 7.3上安装SQL Server 2017
SQL Server,是Microsoft公司推出的关系型数据库服务,是一款成功的数据库产品,在微软的产品中占有非常重要的位置。下图是当前排行前三的数据库,分别是Oracle,MySQL和SQL Server(数据来自DB-Engines 2017年10月)微软在去年3月份的时候,宣布了旗下数据库SQL Server向Linux系统开放。如今,我们已经可以在RHEL中安装SQL Server。今天给大家介绍如何在RHEL7.3上安装SQL Server。在本教程中,首先安装Red Hat Enterprise 7.3,并确保和Internet相连接
注意:在RHEL7.3或更高版本上安装SQL Server 2017要保证计算机至少有3.25G的内存。
第一部分:SQL Server的安装及配置
1.1,下载Microsoft SQL Server Red Hat软件仓库配置文件,此仓库为我们提供了安装SQL Server所必须的软件$ curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server.repo
1.2,更新软件仓库并安装SQL Server
$ yum update
$ yum -y install mssql-server1.3,运行包安装完成后,使用mssql-conf安装并按照提示操作以设置SA密码,并选择你的版本(注意,设置密码时请符合密码安全策略,建议最少8个字符,包括大写和小写字母,十进制数字和/或非字母数字符号。
$ /opt/mssql/bin/mssql-conf setup
The license terms for this product can be found in /usr/share/doc/mssql-server or downloaded from:`
部分省略...
Do you accept the license terms? [Yes/No]:Yes
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.
部分省略....
Enter your edition(1-7): 3 Enter the SQL Server system administrator password: [你的SA密码]
Confirm the SQL Server system administrator password: [你的SA密码]
Configuring SQL Server...
部分省略...
Setup has completed successfully. SQL Server is now starting.1.4,配置完成后,请验证服务是否正在运行。
$ 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 Thu 2017-10-12 03:50:58 CST; 3min 58s ago
Docs: https://docs.microsoft.com/en-us/sql/linux Main PID: 3238 (sqlservr)
CGroup: /system.slice/mssql-server.service
├─3238 /opt/mssql/bin/sqlservr
└─3258 /opt/mssql/bin/sqlservr1.5,如果你的服务器允许远程连接数据库,请在防火墙上设置相关策略,SQL Server默认使用1433 / tcp端口
$ firewall-cmd --permanent --add-port = 1433 / tcp
$ firewall-cmd --reload第二部分:SQL Server的其他配置此时
数据库已经准备就绪。如果需要安装SQL Server命令行,例如创建数据库,需要使用命令sqlcmd和bcp。则需要安装相应软件,此时请执行以下操作:2.1,同样下载Microsoft Red Hat软件库配置文件,并更新
$ yum update
2.2,如果你有以前版本的mssql工具安装,请删除任何较旧的unixODBC程序包。如果没有,请跳过此步骤,直接进行2.3步
$ yum remove unixODBC-utf16 unixODBC-utf16-devel
2.3,安装mssql工具与unixODBC开发人员包
$ yum install -y mssql-tools unixODBC-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
部分省略...
The license terms for this product can be downloaded from https://aka.ms/odbc131eula and found in /usr/share/doc/msodbcsql/LICENSE.TXT . By entering 'YES', you indicate that you accept the license terms.
Do you accept the license terms? (Enter YES or NO)
YES # 请输入YES
Installing : >msodbcsql-13.1.9.1-1.x86_64 3/5
The license terms for this product can be downloaded from http://go.microsoft.com/fwlink/?LinkId=746949 and found in /usr/share/doc/mssql-tools/LICENSE.txt . By entering 'YES',
you indicate that you accept the license terms.
Do you accept the license terms? (Enter YES or NO)
YES # 请输入YES
部分省略...
Complete!2.4,为方便起见,添加/opt/mssql-tools/bin/到你路径环境变量。这使您可以在Bash中直接运行工具,而无需指定完整路径。运行以下命令以修改路径登录会话和交互式/非 - 登录会话:
$ echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> /etc/bashrc
$ echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> /etc/profile
$ source /etc/bashrc注意:这里做了全局的环境变量,如果您不要设置全局的环境变量,可以将/etc/bashrc替换为$HOME/.bashrc,将/etc/profile替换为$HOME/.bash_profile
第三部分:SQL服务器本地测试
3.1,测试,使用本地方式登录数据库,如果登录成功,则提示1>$ /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa
Password:
1> CREATE DATABASE test
2> GO
1> USE test 2> GO
Changed database context to 'test'.
1> quit- 至此,安装就结束了。
在Red Hat Enterprise Linux 7.3上安装SQL Server 2017的更多相关文章
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server——RHEL上的“类”SQL Server Cluster功能
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...
- Configure Red Hat Enterprise Linux shared disk cluster for SQL Server
下面一步一步介绍一下如何在Red Hat Enterprise Linux系统上为SQL Server配置共享磁盘集群(Shared Disk Cluster)及其相关使用(仅供测试学习之用,基础篇) ...
- Red Hat Enterprise Linux 7.4上安装Oracle 11.2.0.4
1. 配置Yum源及关闭SeLinux [root@localhost ~]# mkdir /media/rhel [root@localhost ~]# mount /dev/cdrom /medi ...
- Red Hat Enterprise Linux / CentOS 7 yum安装zabbix4.0
添加Zabbix存储库安装存储库配置包. 该软件包包含yum(软件包管理器)配置文件. rpm -ivh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_6 ...
- Red Hat Enterprise Linux 6.6安装体验
Red Hat Enterprise Linux 6.6的安装首界面有五个选项,这跟以前的Red Hat Enterprise Linux 5.x的安装界面是有一些区别的. 安装或者升级现有系统( ...
- Red Hat Enterprise Linux 6 “桌面”、“工作站”、“服务器” 版本差异比较
Red Hat Enterprise Linux 6,共有三个版本.通过安装发现,所谓的"桌面"."工作站"."服务器"这三个版本的区别就在 ...
- Red Hat Enterprise Linux 5 64-bit chinese language support config steps
Red Hat Enterprise Linux 5 64-bit 系统下安装中文语言支持方法 测试环境:Windows2012+Vmvare9.0+Red Hat Enterprise Linux ...
- How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7
How to disable transparent hugepages (THP) on Red Hat Enterprise Linux 7 $ Solution 已验证 - 已更新2017年六月 ...
- Red Hat Enterprise Linux 7.2修改主机名(hostname)
Red Hat Enterprise Linux 7.2在安装的时候,会默认生成主机名:localhost. 那么如何修改成自己想要的自己名? //格式为:用户名@主机名 比如: [root@loca ...
随机推荐
- Java设计模式—命令模式
命令模式是一个高内聚的模式. 定义如下:将一个请求封装成一个对象,从而让你使用不同的请求把客户端参数化,对请求排队或者记录请求日志,可以提供命令的撤销和恢复功能. 通用类图如下: 角色说明: ● Re ...
- 一张图看懂 JS 原型链
JS 原型链,画了张图,终于理清楚各种关系有木有 写在最后: __proto__是每个对象都有的一个属性,而prototype是函数才会有的属性!!! function Person() { } 是函 ...
- 路飞学城知识点3缓存知识点之一Djang自带的缓存
缓存是暂时把数据放到哪儿的意思,用于提高查询的访问速度用的,mysql等关系型数据库通常用作备份,数据库进行增删改操作一段时间内存同步到缓存(非关系型数据库中) 缓存与内存的区别: 通常把数据放到内存 ...
- springboot监控
springboot版本 <parent> <groupId>org.springframework.boot</groupId> <artifactId&g ...
- 三年Linux运维工作总结教训
Linux运维一定要知道的六类好习惯和23个教训,避免入坑! 从事运维三年半,遇到过各式各样的问题,数据丢失,网站挂马,误删数据库文件,黑客攻击等各类问题. 今天简单整理一下,分享给各位小伙伴. 一. ...
- 从golang-gin-realworld-example-app项目学写httpapi (二)
https://github.com/gothinkster/golang-gin-realworld-example-app/blob/master/users/models.go 模型定义 use ...
- 集合、深浅copy
集合set: 集合也和列表数组一样有增加,但是集合是真正的没有顺序的 所以集合无法查找的,并且集合的外观你看着好像是字典和列表的组合,因为它是用字典的括号一样 ,但是又是里面并没有键值对 只是一个 ...
- iOS设计模式 - 策略
iOS设计模式 - 策略 效果 说明 1. 把解决相同问题的算法抽象成策略(相同问题指的是输入参数相同,但根据算法不同输出参数会有差异) 2. 策略被封装在对象之中(是对象内容的一部分),策略改变的是 ...
- SVN图标不显示的解决几种方式
系统安装的Tortoise SVN,不知道是不是安装了其他软件的缘故,造成SVN客户端功能可以正常使用,就是文件夹或文件的左下角不显示图标.故上网查找解决方法: 方法一: 升级到最新版本,基本是没用的 ...
- Windows as a Service(1)—— Windows 10服务分支
前言 作为公司的IT管理员,管理全公司Windows 10操作系统的更新一直是工作中的头疼之处.微软提供了很多方法来帮助我们管理公司的Windows 10更新,比如Windows Server Upd ...