Linux下安装SQL Server 2016(安装篇SQL Server on linux)
安装过程
如何安装直接参考这个文章:安装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
- [root@localhost Desktop]# 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 117 0 0:00:01 0:00:01 --:--:-- 117
(2)安装
yum install -y mssql-server
- [root@localhost Desktop]# yum install -y mssql-server
- Loaded plugins: fastestmirror, langpacks
- Loading mirror speeds from cached hostfile
- * base: mirrors.aliyun.com
- * extras: mirrors.aliyun.com
- * updates: mirrors.163.com
- Resolving Dependencies
- --> Running transaction check
- ---> Package mssql-server.x86_64 0:14.0.1.246-6 will be installed
- --> Finished Dependency Resolution
- Dependencies Resolved
- ================================================================================
- Package Arch Version Repository Size
- ================================================================================
- Installing:
- mssql-server x86_64 14.0.1.246-6 packages-microsoft-com-mssql-server 138 M
- Transaction Summary
- ================================================================================
- Install 1 Package
- Total download size: 138 M
- Installed size: 138 M
- Downloading packages:
- 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
- Public key for mssql-server-14.0.1.246-6.x86_64.rpm is not installed
- mssql-server-14.0.1.246-6.x86_64.rpm | 138 MB 14:11
- Retrieving key from https://packages.microsoft.com/keys/microsoft.asc
- Importing GPG key 0xBE1229CF:
- Userid : "Microsoft (Release signing) <gpgsecurity@microsoft.com>"
- Fingerprint: bc52 8686 b50d 79e3 39d3 721c eb3e 94ad be12 29cf
- From : https://packages.microsoft.com/keys/microsoft.asc
- Running transaction check
- Running transaction test
- Transaction test succeeded
- Running transaction
- Installing : mssql-server-14.0.1.246-6.x86_64 1/1
- +-------------------------------------------------------------------+
- | Please run /opt/mssql/bin/sqlservr-setup to complete the setup of |
- | Microsoft(R) SQL Server(R). |
- +-------------------------------------------------------------------+
- Verifying : mssql-server-14.0.1.246-6.x86_64 1/1
- Installed:
- mssql-server.x86_64 0:14.0.1.246-6
- Complete!
- [root@localhost Desktop]#
(3)配置
/opt/mssql/bin/sqlservr-setup
这个主要是设置sql server的系统管理员sa的密码,要求密码最少8个字符、数字、非字母数字符号等。
另外,还要求内存至少3250M,少一点就报错。。。
最后会问是否要启动sql server服务,是否要在系统启动时启动sql server,输入y就可以了。
- [root@localhost Desktop]# /opt/mssql/bin/sqlservr-setup
- Microsoft(R) SQL Server(R) Setup
- You can abort setup at anytime by pressing Ctrl-C. Start this program
- with the --help option for information about running it in unattended
- mode.
- Please enter a password for the system administrator (SA) account:
- Please confirm the password for the system administrator (SA) account:
- Setting system administrator (SA) account password...
- Do you wish to start the SQL Server service now? [y/n]: y
- Do you wish to enable SQL Server to start on boot? [y/n]: y
- Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service.
- Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server-telemetry.service to /usr/lib/systemd/system/mssql-server-telemetry.service.
- Setup completed successfully.
(4)看一下sql server的状态
这里先把状态写入s.txt文件,然后查看s.txt文件。
会发现有好几个进程。
- [root@localhost Desktop]# systemctl status mssql-server > s.txt
- [root@localhost Desktop]# cat s.txt
- ● mssql-server.service - Microsoft(R) SQL Server(R) Database Engine
- Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
- Active: active (running) since Thu 2016-12-01 15:09:51 CST; 31min ago
- Main PID: 4963 (sqlservr)
- CGroup: /system.slice/mssql-server.service
- ├─4963 /opt/mssql/bin/sqlservr
- └─4971 /opt/mssql/bin/sqlservr
- Dec 01 15:09:58 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/mssql-server.service:15] Unknown lvalue 'TasksMax' in section 'Service'
- 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.
- 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.
- Dec 01 15:09:58 localhost.localdomain sqlservr[4963]: 2016-12-01 07:09:58.45 spid20s Service Broker manager has started.
- 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.
- 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.'
- Dec 01 15:15:02 localhost.localdomain sqlservr[4963]: 2016-12-01 07:15:02.11 spid51 Using 'dbghelp.dll' version '4.0.5'
- 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.
- 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.
- 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)的更多相关文章
- Linux下MyCat和MyCat_web的安装和配置
Linux下MyCat和MyCat_web的安装和配置 Mycat 是一个数据库分库分表中间件 Mycat web 可以对 Mycat进行监控,这里分享一下 Mycat web 的搭建过程 详细内容可 ...
- (转)linux下weblogic12c集群的安装部署
本文介绍linux下weblogic12c集群的安装部署,版本12c,其他版本操作会有所不同,但其大体操作基本都是一样的 关于weblogic的集群,在此就不多做介绍了,如果有不了解的朋友可以百度搜索 ...
- linux下使用非root账号安装zabbix-client
linux下使用非root账号安装zabbix-client使用非root账号rusky登录:[rusky@testServer]#tar zxvf zabbix-2.4.5.tar.gz #cd z ...
- linux下搭建lamp环境以及安装swoole扩展
linux下搭建lamp环境以及安装swoole扩展 一.CentOS 6.5使用yum快速搭建LAMP环境 准备工作:先更新一下yum源 我安装的环境是:apache2.2.15+mysql5 ...
- Linux下如何查看tomcat是否安装、启动、文件路径、进程ID
Linux下如何查看tomcat是否安装.启动.文件路径.进程ID 在Linux系统下,Tomcat使用命令的操作! 检测是否有安装了Tomcat: rpm -qa|grep tomcat 查看Tom ...
- Linux下tomcat6.0与jdk安装
Linux下tomcat6.0与jdk安装 步骤如下: 1. 上传apache-tomcat-6.0.37.tar.gz和jdk-6u13-linux-i586.bin至/usr/local 给这两个 ...
- windows server 2016安装docker
最近微软发布了windows server 2016,并原生支持docker,本文通过一系列的步骤,来学习怎么在windows server 2016安装docker. 1.下载 windows se ...
- Linux下通过源码编译安装程序
本文简单的记录了下,在linux下如何通过源码安装程序,以及相关的知识.(大神勿喷^_^) 一.程序的组成部分 Linux下程序大都是由以下几部分组成: 二进制文件:也就是可以运行的程序文件 库文件: ...
- Linux下非root用户如何安装软件
Linux下非root用户如何安装软件 从windows转移到Linux的用户最开始总会有各种不适,因为这种不适最终放弃linux的不在少数.对于这类人只能说可惜,还没有领略到linux的美好就过早放 ...
- linux下Redis与phpredis扩展安装
++++++++++++++++++++++++++++++++++++++++++++++linux下Redis与phpredis扩展安装++++++++++++++++++++++++++++++ ...
随机推荐
- Windows核心编程:第13章 内存体系结构
Github https://github.com/gongluck/Windows-Core-Program.git //第13章 内存体系结构.cpp: 定义应用程序的入口点. // #inclu ...
- C#常用修饰符
访问修饰符 访问修饰符是一些关键字,用于指定声明的成员或类型的可访问性,C#有4个访问修饰符:public.private.protected.internal,使用这些访问修饰符可以指定以下5个访问 ...
- VS动态修改App.config中遇到的坑(宿主进程问题)
昨天遇到了很奇怪的一个bug,具体描述如下: 这个系统是c/s架构的针对多个工厂做的资材管理系统,由于有很多个工厂,每个工厂都有自己的服务器.所以需要动态的改变连接字符串去链接不同的服务器. 由于这个 ...
- Asp.Net Mvc异步上传文件的方式
今天试了下mvc自带的ajax,发现上传文件时后端action接收不到文件, Request.Files和HttpPostedFileBase都接收不到.....后来搜索了下才知道mvc自带的Ajax ...
- 深入解析SQL Server高可用镜像实现原理
本文来自网易云社区 SQL Server 是windows平台.NET架构下标配数据库解决方案,与Oracle.MySQL共同构成了DB-Engines Ranking的第一阵营,在国内外企业市场中有 ...
- Bash/Shell-脚本整理(长期更新)
轮询检测Apache状态并启用钉钉报警 #!/bin/bash shell_user="root" shell_domain="apache" shell_li ...
- 【五校联考3day2】C
題意: 現有一平面直角坐標系,有n個點,每一個點必須向某一個方向發射射線,且任意一條射線必須與某一條坐標軸平行.定義一種發射射線的方案是合法的,則方案必須滿足: 1.沒有一條射線交叉 2.沒有一條射線 ...
- underscore.js源码研究(7)
概述 很早就想研究underscore源码了,虽然underscore.js这个库有些过时了,但是我还是想学习一下库的架构,函数式编程以及常用方法的编写这些方面的内容,又恰好没什么其它要研究的了,所以 ...
- 使用httpClient模拟http请求
在很多场景下都需要用到java代码来发送http请求:如和短信后台接口的数据发送,发送数据到微信后台接口中: 这里以apache下的httpClient类来模拟http请求:以get和Post请求为例 ...
- 如何做好错误处理?(PHP篇)
起因 之前我在封装 PHP 一个类库的时候,如果有遇到错误(例如构造函数传参不合法的话),则直接 die() ,后来发现这种方法很不好,会直接退出程序. 所以我想到给 PHP 上异常捕获的机制了. 错 ...