Red Hat Enterprise Linux 7.2下使用RPM包安裝SQL Server vNext

來源:互聯網
上載者:User

標籤:about   download   還需要   long   lin   登入   dll   ref   bin   

1.下載安裝包

mssql-server:https://packages.microsoft.com/rhel/7/mssql-server/

mssql-tools:https://packages.microsoft.com/rhel/7/prod/

[[email protected] home]# ll
總用量 150072

-rw-r--r--   1 root        root            4036892 1月  23 14:59 msodbcsql-13.1.3.0-1.x86_64.rpm
-rw-r--r--   1 root        root        148973180 1月  23 14:33 mssql-server-14.0.200.24-2.x86_64.rpm
-rw-r--r--   1 root        root              254352 1月  23 14:58 mssql-tools-14.0.2.0-1.x86_64.rpm

2.安裝mssql-server

[[email protected] home]# rpm -ivh mssql-server-14.0.200.24-2.x86_64.rpm
警告:mssql-server-14.0.200.24-2.x86_64.rpm: 頭V4 RSA/SHA256 Signature, 金鑰識別碼 be1229cf: NOKEY
準備中...                          ################################# [100%]
正在升級/安裝...
   1:mssql-server-14.0.200.24-2       ################################# [100%]

+-------------------------------------------------------------------+
| Please run /opt/mssql/bin/sqlservr-setup to complete the setup of |
|                  Microsoft(R) SQL Server(R).                      |
+-------------------------------------------------------------------+

3.設定資料庫並啟動

[[email protected] home]# /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.

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? If so, please type "YES": yes

Please enter a password for the system administrator (SA) account:
The specified password does not meet SQL Server password policy requirements
because it is not complex enough. The password must be at least 8 characters
long and contain characters from three of the following five sets: uppercase
letters, lowercase letters, numbers, non-alphanumeric characters, or unicode
characters that are categorized as alphabetic characters, but are not
uppercase or lowercase.

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.通過systemctl來檢查mssql-server的服務的啟動狀態

[[email protected] home]# 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 一 2017-01-23 14:44:49 CST; 6min ago
Main PID: 9638 (sqlservr)
   CGroup: /system.slice/mssql-server.service
           ├─9638 /opt/mssql/bin/sqlservr
           └─9648 /opt/mssql/bin/sqlservr

1月 23 14:44:57 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:57.90 spid20s     The Service Broker endpoint is in disabled or stopped state.
1月 23 14:44:57 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:57.90 spid20s     The Database Mirroring endpoint is in disabled or stopped state.
1月 23 14:44:57 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:57.93 spid20s     Service Broker manager has started.
1月 23 14:44:57 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:57.98 spid16s     A self-generated certificate was successfully loaded for encryption.
1月 23 14:44:58 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:58.01 spid16s     Server is listening on [ 0.0.0.0 <ipv4> 1433].
1月 23 14:44:58 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:58.05 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434].
1月 23 14:44:58 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:58.08 Server      Dedicated admin connection support was established for listening locally on port 1434.
1月 23 14:44:58 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:58.08 spid16s     Recovery is complete. This is an informational message only. No user action is required.
1月 23 14:44:58 FSZABBIX sqlservr[9638]: 2017-01-23 06:44:58.09 spid16s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
1月 23 14:50:00 FSZABBIX sqlservr[9638]: 2017-01-23 06:50:00.95 spid51      Using ‘dbghelp.dll‘ version ‘4.0.5‘

5.設定資料庫

通過內建的mssql-conf命令進行一些簡單的配置,可配置項不多,主要是監聽連接埠,預設的資料檔案所在目錄,日誌所在目錄,備份所在目錄等

[[email protected] home]# /opt/mssql/bin/mssql-conf list
Supported settings using the ‘set‘ option:
tcpport
defaultbackupdir
defaultdumpdir
defaultlogdir
defaultdatadir
For all command line options use -h or –help

6.安裝mssql-tool

如果希望在伺服器上直接通過sqlcmd命令列登入資料庫,還需要額外安裝一個mssql-tools的RPM包,這個安裝包裡包括sqlcmd和bcp(Bulk import-export utility)

安裝mssql-tool,需要先安裝msodbcsql包

[[email protected] home]# rpm -ivh msodbcsql-13.1.3.0-1.x86_64.rpm
警告:msodbcsql-13.1.3.0-1.x86_64.rpm: 頭V4 RSA/SHA256 Signature, 金鑰識別碼 be1229cf: NOKEY
準備中...                          ################################# [100%]
The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746838 and found in
/usr/share/doc/msodbcsql/LICENSE.TXT . By entering ‘YES‘,
you indicate that you accept the license terms.

Do you accept the license terms? (Enter YES or NO)
yes
Please enter YES or NO
Do you accept the license terms? (Enter YES or NO)
YES
正在升級/安裝...
   1:msodbcsql-13.1.3.0-1             ################################# [100%]
[[email protected] home]# rpm -ivh mssql-tools-14.0.2.0-1.x86_64.rpm
警告:mssql-tools-14.0.2.0-1.x86_64.rpm: 頭V4 RSA/SHA256 Signature, 金鑰識別碼 be1229cf: NOKEY
準備中...                          ################################# [100%]
The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746949 and found in
/usr/share/doc/mssql-tools/LICENSE.txt . By entering ‘YES‘,
you indicate that you accept the license terms.

Do you accept the license terms? (Enter YES or NO)
YES
正在升級/安裝...
   1:mssql-tools-14.0.2.0-1           ################################# [100%]

7.通過sqlcmd登入資料庫

Red Hat Enterprise Linux 7.2下使用RPM包安裝SQL Server vNext

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.