在 CentOS 安裝一下 微軟的 SQL 測試一下 :
要有 4G 以上的 OS
[root@test ~]# 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 796 0 --:--:-- --:--:-- --:--:-- 797
[root@test ~]# yum install -y mssql-server
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.tc.edu.tw
* epel: mirror01.idc.hinet.net
* extras: ftp.tc.edu.tw
* updates: ftp.tc.edu.tw
Resolving Dependencies
--> Running transaction check
---> Package mssql-server.x86_64 0:14.0.304.138-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================================
Installing:
mssql-server x86_64 14.0.304.138-1 packages-microsoft-com-mssql-server 144 M
Transaction Summary
===========================================================================================================================================================================================================
Install 1 Package
Total download size: 144 M
Installed size: 144 M
Downloading packages:
mssql-server-14.0.304.138-1.x86_64.rpm | 144 MB 00:00:43
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mssql-server-14.0.304.138-1.x86_64 1/1
+--------------------------------------------------------------------------+
| Please run sudo /opt/mssql/bin/mssql-conf setup to complete the setup of |
| Microsoft(R) SQL Server(R). |
+--------------------------------------------------------------------------+
Verifying : mssql-server-14.0.304.138-1.x86_64 1/1
Installed:
mssql-server.x86_64 0:14.0.304.138-1
Complete!
[root@test ~]# /opt/mssql/bin/mssql-conf setup
The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388
and found in /usr/share/doc/mssql-server/LICENSE.TXT.
Do you accept the license terms? [Yes/No]:Yes
Setting up Microsoft SQL Server
Enter the new SQL Server system administrator password: P@ssw0rd
Confirm the new SQL Server system administrator password:P@ssw0rd
Starting Microsoft SQL Server...
Enabling Microsoft SQL Server to run at boot...
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.
[root@test ~]# systemctl status mssql-server
● 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 Tue 2017-02-21 14:02:27 CST; 19s ago
Main PID: 3083 (sqlservr)
CGroup: /system.slice/mssql-server.service
├─3083 /opt/mssql/bin/sqlservr
└─3149 /opt/mssql/bin/sqlservr
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.13 Server Dedicated admin connection support was established for listening locally on port 1434.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.13 spid17s SQL Server is now ready for client connections. This is an informational message; no user action is required.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.27 spid9s Polybase feature disabled.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.27 spid9s Clearing tempdb database.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.76 spid9s Starting up database 'tempdb'.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.95 spid9s The tempdb database has 1 data file(s).
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.95 spid20s The Service Broker endpoint is in disabled or stopped state.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.96 spid20s The Database Mirroring endpoint is in disabled or stopped state.
Feb 21 14:02:30 test.com sqlservr[3083]: 2017-02-21 06:02:30.98 spid20s Service Broker manager has started.
Feb 21 14:02:31 test.com sqlservr[3083]: 2017-02-21 06:02:31.09 spid5s Recovery is complete. This is an informational message only. No user action is required.
[root@test ~]#
