安装过程

如何安装直接参考这个文章:安装sql server

整个安装过程非常简单

上面的文档里是通过 sudo 命令,用root身份来执行,不过这里为了简单,就用root账号来安装的。

(1)下载sql server的源,便于通过yum命令来安装

curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo
  1. [root@localhost Desktop]# curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo
  2. % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  3. Dload  Upload   Total   Spent    Left  Speed
  4. 100   220  100   220    0     0    117      0  0:00:01  0:00:01 --:--:--   117

(2)安装

yum install -y mssql-server
  1. [root@localhost Desktop]# yum install -y mssql-server
  2. Loaded plugins: fastestmirror, langpacks
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * extras: mirrors.aliyun.com
  6. * updates: mirrors.163.com
  7. Resolving Dependencies
  8. --> Running transaction check
  9. ---> Package mssql-server.x86_64 0:14.0.1.246-6 will be installed
  10. --> Finished Dependency Resolution
  11. Dependencies Resolved
  12. ================================================================================
  13. Package       Arch    Version       Repository                            Size
  14. ================================================================================
  15. Installing:
  16. mssql-server  x86_64  14.0.1.246-6  packages-microsoft-com-mssql-server  138 M
  17. Transaction Summary
  18. ================================================================================
  19. Install  1 Package
  20. Total download size: 138 M
  21. Installed size: 138 M
  22. Downloading packages:
  23. warning: /var/cache/yum/x86_64/7/packages-microsoft-com-mssql-server/packages/mssql-server-14.0.1.246-6.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID be1229cf: NOKEY
  24. Public key for mssql-server-14.0.1.246-6.x86_64.rpm is not installed
  25. mssql-server-14.0.1.246-6.x86_64.rpm                       | 138 MB   14:11
  26. Retrieving key from https://packages.microsoft.com/keys/microsoft.asc
  27. Importing GPG key 0xBE1229CF:
  28. Userid     : "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
  29. Fingerprint: bc52 8686 b50d 79e3 39d3 721c eb3e 94ad be12 29cf
  30. From       : https://packages.microsoft.com/keys/microsoft.asc
  31. Running transaction check
  32. Running transaction test
  33. Transaction test succeeded
  34. Running transaction
  35. Installing : mssql-server-14.0.1.246-6.x86_64                             1/1
  36. +-------------------------------------------------------------------+
  37. | Please run /opt/mssql/bin/sqlservr-setup to complete the setup of |
  38. |                  Microsoft(R) SQL Server(R).                      |
  39. +-------------------------------------------------------------------+
  40. Verifying  : mssql-server-14.0.1.246-6.x86_64                             1/1
  41. Installed:
  42. mssql-server.x86_64 0:14.0.1.246-6
  43. Complete!
  44. [root@localhost Desktop]#

(3)配置

/opt/mssql/bin/sqlservr-setup

这个主要是设置sql server的系统管理员sa的密码,要求密码最少8个字符、数字、非字母数字符号等。

另外,还要求内存至少3250M,少一点就报错。。。

最后会问是否要启动sql server服务,是否要在系统启动时启动sql server,输入y就可以了。

  1. [root@localhost Desktop]# /opt/mssql/bin/sqlservr-setup
  2. Microsoft(R) SQL Server(R) Setup
  3. You can abort setup at anytime by pressing Ctrl-C. Start this program
  4. with the --help option for information about running it in unattended
  5. mode.
  6. Please enter a password for the system administrator (SA) account:
  7. Please confirm the password for the system administrator (SA) account:
  8. Setting system administrator (SA) account password...
  9. Do you wish to start the SQL Server service now? [y/n]: y
  10. Do you wish to enable SQL Server to start on boot? [y/n]: y
  11. Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service.
  12. Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server-telemetry.service to /usr/lib/systemd/system/mssql-server-telemetry.service.
  13. Setup completed successfully.

(4)看一下sql server的状态

这里先把状态写入s.txt文件,然后查看s.txt文件。

会发现有好几个进程。

  1. [root@localhost Desktop]# systemctl status mssql-server > s.txt
  2. [root@localhost Desktop]# cat s.txt
  3. ● mssql-server.service - Microsoft(R) SQL Server(R) Database Engine
  4. Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
  5. Active: active (running) since Thu 2016-12-01 15:09:51 CST; 31min ago
  6. Main PID: 4963 (sqlservr)
  7. CGroup: /system.slice/mssql-server.service
  8. ├─4963 /opt/mssql/bin/sqlservr
  9. └─4971 /opt/mssql/bin/sqlservr
  10. Dec 01 15:09:58 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/mssql-server.service:15] Unknown lvalue 'TasksMax' in section 'Service'
  11. Dec 01 15:09:58 localhost.localdomain sqlservr[4963]: 2016-12-01 07:09:58.39 spid20s     The Service Broker endpoint is in disabled or stopped state.
  12. Dec 01 15:09:58 localhost.localdomain sqlservr[4963]: 2016-12-01 07:09:58.39 spid20s     The Database Mirroring endpoint is in disabled or stopped state.
  13. Dec 01 15:09:58 localhost.localdomain sqlservr[4963]: 2016-12-01 07:09:58.45 spid20s     Service Broker manager has started.
  14. Dec 01 15:09:58 localhost.localdomain sqlservr[4963]: 2016-12-01 07:09:58.51 spid5s      Recovery is complete. This is an informational message only. No user action is required.
  15. Dec 01 15:10:00 localhost.localdomain sqlservr[4963]: 2016-12-01 07:10:00.34 spid30s     The activated proc '[dbo].[sp_syspolicy_events_reader]' running on queue 'msdb.dbo.syspolicy_event_queue' output the following:  'Transaction (Process ID 30) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.'
  16. Dec 01 15:15:02 localhost.localdomain sqlservr[4963]: 2016-12-01 07:15:02.11 spid51      Using 'dbghelp.dll' version '4.0.5'
  17. Dec 01 15:15:08 localhost.localdomain sqlservr[4963]: 2016-12-01 07:15:08.27 spid51      Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
  18. Dec 01 15:15:08 localhost.localdomain sqlservr[4963]: 2016-12-01 07:15:08.32 spid51      Using 'xplog70.dll' version '2016.140.01' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
  19. Dec 01 15:33:36 localhost.localdomain sqlservr[4963]: 2016-12-01 07:31:59.09 spid3s      Warning: Failure to calculate super-latch promotion threshold.
 

至此,sql server安装完成

Microsoft Sql Server 2016安装在CentOS7下的更多相关文章

  1. Microsoft SQL Server 2016 RC3 安装

    首先下载SQL Server 2016 RC3 安装iso 下载链接 ed2k://|file|cn_sql_server_2016_rc_3_x64_dvd_8566578.iso|24648232 ...

  2. Microsoft SQL Server 2008 安装图解(Windows 7)

    简介 本文详细记录了一次完整的Microsoft SQL Server 2008在Windows 7操作系统上的安装过程.注意:Microsoft SQL Server 2008与Windows 7操 ...

  3. Microsoft SQL Server 2012安装说明

    Microsoft SQL Server 2012安装说明 环境:Windows8, Windows7, WinVista, Win2003, WinXP Microsoft SQL Server 2 ...

  4. 【安装】Microsoft SQL Server的安装

    数据库版本:2012 系统环境:windows 7 一.安装 依次选择“安装->全新 SQL Server 独立安装或向现有安装添加功能”;点“确定” 选择版本,推荐标准版,这里是直接输入序列号 ...

  5. SQL server 2016 安装步骤

    1.进入安装中心:可以参考硬件和软件要求.可以看到一些说明文档 2.选择全新安装模式继续安装 3.输入产品秘钥:这里使用演示秘钥进行 4.在协议中,点击同意,并点击下一步按钮,继续安装 5.进入全局规 ...

  6. cn microsoft hyper-v server 2016 安装笔记

    英文版,先用,随后 中文版再出笔记 不知道是不是 WINDOWS 7 USB DVD TOOLS 没有更新,怎么做不了优盘启动,只能找个 替代工具RUFUS.

  7. SQL Server 2016正式版安装(超多图)

    微软数据库SQL Server 2016正式版在2016年6月就发布,由于近期工作忙,一直拖到现在才有时间把安装过程写到博客上,分享给大家.本人一直习惯使用英文版,所以版本和截图都是英文版的.废话少说 ...

  8. SQL Server系列之SQL Server 2016 中文企业版详细安装步骤(超多图)

    1. 下载地址 下载地址 :https://www.microsoft.com/en-us/server-cloud/products/sql-server-2016/ 官方技术文档:https:// ...

  9. 静默安装、授权及卸载Microsoft SQL Server、NET Framework、Windows Installer 、ArcGIS License Manager、ArcGIS Engine(Silent install、uninstall and Authorization.. .through Setup Factory)基于Setup Factory

    通过Setup Factory写的代码大概有1700行,所以就不整理了.思路如下: 静默安装都是通过去Microsoft 和Esri的官网找到静默安装的命令,然后File.Run(...)或者Shel ...

随机推荐

  1. 第七章 二叉搜索树 (d2)AVL树:插入

  2. MD5摘要算法实现

    网上找到的实现md5函数代码,包括一个头文件md5.h和一个源文件md5.c,用下面的测试代码test.c测试通过,各文件依次如下: 头文件md5.h: #ifndef MD5_H #define M ...

  3. 【英宝通Unity4.0公开课学习 】(二)场景创建

    本讲共四节,貌似讲课老师的速度变快了,2倍速听不清了...调成了1.7倍...老师果然越来越熟练了啊! 而且最开始的萌妹纸也不再出现在视频里了,我当时还想着完全可以换成老师自己提问嘛! 不过有妹纸声音 ...

  4. TZOJ 2755 国际象棋(广搜+哈希)

    描述 在n*n的国际象棋棋盘中,给定一“马(Knight)”和一“后(Queen)”的位置,问“马”能否在m步之内(包括m步)到达“后”的位置?马的走法是:每步棋先横走或直走一格,然后再斜走一格,即走 ...

  5. [leetcode]277. Find the Celebrity 找名人

    Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist o ...

  6. cookies,sessionStorage 和 localStorage 的区别

    请描述一下 cookies,sessionStorage 和 localStorage 的区别? sessionStorage 和 localStorage 是HTML5 Web Storage AP ...

  7. Legendre多项式

    Legendre多项式 时间限制: 1 Sec  内存限制: 128 MB 题目描述 Legendre多项式的递归公式

  8. 品味性能之道<四>:管理重于技术

      一.性能优化中的角色分工 (1).老外的角色分工         在oracle性能优化方法论中,将IT系统中不同角色需要承担的性能优化工作罗列如下. 各司其职的角色分工 业务分析人员 1.业务需 ...

  9. dump打印

  10. 学习bn算法

    好处: 1.归一化后有什么好处呢?原因在于神经网络学习过程本质就是为了学习数据分布,一旦训练数据与测试数据的分布不同,那么网络的泛化能力也大大降低: 2.另外一方面,一旦每批训练数据的分布各不相同(b ...