Microsoft Sql Server 2016安装在CentOS7下
2017-01-25 21:10
597 查看
安装过程
如何安装直接参考这个文章:安装sql server
整个安装过程非常简单
。
上面的文档里是通过 sudo 命令,用root身份来执行,不过这里为了简单,就用root账号来安装的。
(1)下载sql server的源,便于通过yum命令来安装
[plain] view plain copy
[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)安装
[plain] view plain copy
[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)配置
这个主要是设置sql server的系统管理员sa的密码,要求密码最少8个字符、数字、非字母数字符号等。
另外,还要求内存至少3250M,少一点就报错
。。。
最后会问是否要启动sql server服务,是否要在系统启动时启动sql server,输入y就可以了。
[plain] view plain copy
[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文件。
会发现有好几个进程。
[plain] view plain copy
[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安装完成
如何安装直接参考这个文章:安装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
[plain] view plain copy
[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
[plain] view plain copy
[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就可以了。
[plain] view plain copy
[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文件。
会发现有好几个进程。
[plain] view plain copy
[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安装完成
相关文章推荐
- Windows7下Microsoft SQL Server 2008安装图解和注意事项
- centOS 6通过yum安装php-mssql以使php支持microsoft sql server连接
- 安装SQL 2016的时候 Microsoft R Open 和 Microsoft R Server 安装文件的位置
- Microsoft SQL Server 2016 RC3 安装
- 在windows 7下安装了microsoft SQL server 2005
- MicrosoftSQLServer安装示例
- Microsoft SQL Server 2005 安装失败处理
- 2-解决“无法找到产品Microsoft SQL Server 2005 向后兼容的安装程序包”
- 我安装Microsoft SQLServer 2000时出现问题
- InstallShield 安装程序判断用户是否已安装Microsoft SQL Server或MSDE!
- Microsoft SQL Server 2005 JDBC Driver 1.1的安装
- microsoft sql server 2005安装
- microsoft sql server 2000安装出现已有程序挂起而中断安装怎么回事呢?
- vista安装具有高级服务的 Microsoft SQL Server 2005 Express Edition Service Pack 2
- 安装Microsoft SQL Server 2005出现COM+出错问题及解决
- 使用 Microsoft SQL Server 2000 各种版本或组件而必须安装的操作系统
- Microsoft SQL Server Desktop Engine安装过程中遇到的问题(1)
- 完全卸载Microsoft SQL Server 2005软件,解决多次安装软件失败问题
- Microsoft SQL Server Desktop Engine安装过程中遇到的问题(1)
- 安装SQL Server2000时出现下面的提示:Microsoft SQL Server 2000 Enterprise Edition服务器组件在此操作系统上不受支持,只有客户端组件