安装过程

如何安装直接参考这个文章:安装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安装完成

Linux下安装SQL Server 2016(安装篇SQL Server on linux)的更多相关文章

  1. Linux下MyCat和MyCat_web的安装和配置

    Linux下MyCat和MyCat_web的安装和配置 Mycat 是一个数据库分库分表中间件 Mycat web 可以对 Mycat进行监控,这里分享一下 Mycat web 的搭建过程 详细内容可 ...

  2. (转)linux下weblogic12c集群的安装部署

    本文介绍linux下weblogic12c集群的安装部署,版本12c,其他版本操作会有所不同,但其大体操作基本都是一样的 关于weblogic的集群,在此就不多做介绍了,如果有不了解的朋友可以百度搜索 ...

  3. linux下使用非root账号安装zabbix-client

    linux下使用非root账号安装zabbix-client使用非root账号rusky登录:[rusky@testServer]#tar zxvf zabbix-2.4.5.tar.gz #cd z ...

  4. linux下搭建lamp环境以及安装swoole扩展

    linux下搭建lamp环境以及安装swoole扩展   一.CentOS 6.5使用yum快速搭建LAMP环境 准备工作:先更新一下yum源  我安装的环境是:apache2.2.15+mysql5 ...

  5. Linux下如何查看tomcat是否安装、启动、文件路径、进程ID

    Linux下如何查看tomcat是否安装.启动.文件路径.进程ID 在Linux系统下,Tomcat使用命令的操作! 检测是否有安装了Tomcat: rpm -qa|grep tomcat 查看Tom ...

  6. Linux下tomcat6.0与jdk安装

    Linux下tomcat6.0与jdk安装 步骤如下: 1. 上传apache-tomcat-6.0.37.tar.gz和jdk-6u13-linux-i586.bin至/usr/local 给这两个 ...

  7. windows server 2016安装docker

    最近微软发布了windows server 2016,并原生支持docker,本文通过一系列的步骤,来学习怎么在windows server 2016安装docker. 1.下载 windows se ...

  8. Linux下通过源码编译安装程序

    本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...

  9. Linux下非root用户如何安装软件

    Linux下非root用户如何安装软件 从windows转移到Linux的用户最开始总会有各种不适,因为这种不适最终放弃linux的不在少数.对于这类人只能说可惜,还没有领略到linux的美好就过早放 ...

  10. linux下Redis与phpredis扩展安装

    ++++++++++++++++++++++++++++++++++++++++++++++linux下Redis与phpredis扩展安装++++++++++++++++++++++++++++++ ...

随机推荐

  1. 代码面试集锦 1 - Uber

    Given an array of integers, return a new array such that each element at index i of the new array is ...

  2. Win7的“以管理员身份运行”

    如果HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA被设置为0,则"以管理员身份运行" ...

  3. C++获取系统信息(IP地址、硬件信息等)

    #include<stdio.h> #include<winsock2.h> //该头文件需在windows.h之前 #include<windows.h> #in ...

  4. 13_python_内置函数

  5. select2插件使用小记

    插件官网:https://select2.github.io/examples.html 页面引入: // 页面顶部 <link rel="stylesheet" type= ...

  6. 版本控制工具git

    公司要求用git,感觉不如svn好使,还是命令行的,暂时记录一下. 服务器是在linux上可以直接安装.我是虚拟机centos6.9版本.yum install -y git 查看版本号是git -- ...

  7. Maven - Maven速成

    Maven Maven是一个项目构建和管理工具,有助于开发者快速完成项目的配置,快速建立开发环境,从而提高开发效率. 管理项目构建(build)的生命周期(清理.编译.测试.打包.发布.部署.报告等) ...

  8. Linux - APT包管理

    dpkg与apt dpkg用来安装本地deb格式软件包,但不会解决软件包的依赖关系. APT(Advanced Packaging Tool)是从更新源获取并安装软件包,而且会解决依赖关系, 但不会安 ...

  9. [Leetcode]123.买卖股票的最佳时机3

    [原题链接][https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-iii/] 分析:动态规划+二分法.以第i天为分界线,计 ...

  10. 架构模式数据源模式之:数据映射器(Data Mapper)

    一:数据映射器 关系型数据库用来存储数据和关系,对象则可以处理业务逻辑,所以,要把数据本身和业务逻辑糅杂到一个对象中,我们要么使用 活动记录,要么把两者分开,通过数据映射器把两者关联起来. 数据映射器 ...