源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

CentOS 7.3上SQL Server vNext CTP 1.2安装教程

  • 时间:2020-09-02 09:11 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:CentOS 7.3上SQL Server vNext CTP 1.2安装教程
 SQL Server vNext CTP 1.2安装教程: 此安装过程参考微软官方的安装文档:[url=https://docs.microsoft.com/zh-tw/sql/linux/sql-server-linux-overview]https://docs.microsoft.com/zh-tw/sql/linux/sql-server-linux-overview[/url] 支持的环境: [img]http://files.jb51.net/file_images/article/201701/201701231424121.png[/img] 微软官方提示,在Linux上安装SQL Server需要至少3.25GB的内存,否则会配置失败。 [img]http://files.jb51.net/file_images/article/201701/201701231424122.png[/img] 为了方便使用,这里采用的是CentOS Linux release 7.3.1611,配置了4GB的内存,也可以根据自己的实际情况进行选择合适的版本。  因为是联网下载安装,所以进行下列操作前,请确认网络是通的,否则会出现类似以下错误: [b]获取GPG密钥失败:[/b] [Errno 14] curl#6 - "Could not resolve host:packages.microsoft.com;未知的名称或服务" 0curl: (6) Could notresolve host: packages.microsoft.com;未知的错误 下载微软SQL Server红帽存储库配置文件:(配置yum源) [root@localhost ~]# 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    341     0 --:--:-- --:--:-- --:--:--   341  通过有root权限的用户进行安装: [root@localhost ~]# yum install mssql-server [img]http://files.jb51.net/file_images/article/201701/201701231424123.png[/img] [img]http://files.jb51.net/file_images/article/201701/201701231424124.png[/img] [root@localhost ~]# /opt/mssql/bin/sqlservr-setup [img]http://files.jb51.net/file_images/article/201701/201701231424125.png[/img] 这里设置SA用户的密码、是否现在启动SQL Server服务、是否设置SQL Server开机自启。 需要注意的是,如果配置的内存不符合要求,会配置失败: [img]http://files.jb51.net/file_images/article/201701/201701231424126.png[/img] 添加内存后重新进行配置即可!如果是在虚拟机中安装的Linux,需要关机后才能添加大内存(3GB以上)。  至此,SQL Server就已经安装好了!既然是安装在Linux系统上,那么肯定需要通过命令行的模式进行管理数据库,Oracle有sqlplus,SQL Server有sqlcmd,但需要另外安装。 [img]http://files.jb51.net/file_images/article/201701/201701231424137.png[/img] 先配置yum源: [root@localhost ~]# curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo  [img]http://files.jb51.net/file_images/article/201701/201701231424138.png[/img] [root@localhost ~]# yum update [img]http://files.jb51.net/file_images/article/201701/201701231424139.png[/img] 这个过程有点长…… [root@localhost ~]# yum update mssql-tools [img]http://files.jb51.net/file_images/article/201701/2017012314241310.png[/img] [root@localhost bin]# sqlcmd -S localhost -U SA -P [img]http://files.jb51.net/file_images/article/201701/2017012314241311.png[/img] 好了,SQL Server on Linux已经安装好了! 以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程素材网。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部