日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

在本文中,我們將學(xué)習(xí)如何在CentOS 7上安裝和配置MS SQL。微軟最近宣布他們計劃發(fā)布適用于Linux的MS SQL。特別是適用于RedHat企業(yè)版Linux、CentOS和Ubuntu的beta版本,但僅適用于64位版本。

先決條件

    一臺至少擁有4GB RAM和30GB硬盤空間的機器。一臺已安裝CentOS 7的機器。具有root權(quán)限或root用戶的用戶。

    在CentOS上安裝MS SQL Server

    由于默認的CentOS倉庫中沒有MS SQL可用,我們需要將MS SQL倉庫的詳細信息添加到本地yum倉庫中。

    為了使用命令行安裝MS SQL Server,我們需要將倉庫添加到本地yum倉庫中。

    # 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 257 0 --:--:-- --:--:-- --:--:-- 257

    登錄后復(fù)制

    更新存儲庫后,我們將運行以下命令來安裝 MS-SQL 服務(wù)器

    # yum update
    # yum install -y mssql-server
    …
    …
    Resolving Dependencies
    --> Running transaction check
    ---> Package mssql-server.x86_64 0:14.0.1.246-6 will be installed
    --> Processing Dependency: bzip2 for package: mssql-server-14.0.1.246-6.x86_64
    --> Processing Dependency: gdb for package: mssql-server-14.0.1.246-6.x86_64
    --> Running transaction check
    ---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
    ---> Package gdb.x86_64 0:7.6.1-80.el7 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
    Installing for dependencies:
    bzip2 x86_64 1.0.6-13.el7 base 52 k
    gdb x86_64 7.6.1-80.el7 base 2.4 M
    Transaction Summary
    ================================================================================
    Install 1 Package (+2 Dependent packages)
    …
    …
    +-------------------------------------------------------------------+
    | 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/3
    Verifying : gdb-7.6.1-80.el7.x86_64 2/3
    Verifying : bzip2-1.0.6-13.el7.x86_64 3/3
    Installed:
    mssql-server.x86_64 0:14.0.1.246-6
    Dependency Installed:
    bzip2.x86_64 0:1.0.6-13.el7 gdb.x86_64 0:7.6.1-80.el7
    Complete!

    登錄后復(fù)制

    配置MS SQL SA帳戶

    安裝完成后,我們將運行sqlservr-setup腳本來設(shè)置SA的密碼;我們需要為 SA 帳戶提供一個強密碼(至少 8 個字符、小寫和大寫字母以及 1 到 10 的數(shù)字或任何非字母數(shù)字字符)

    # sudo /opt/mssql/bin/sqlservr-setup
    Microsoft(R) SQL Server(R) Setup
    You can abort setup at any time 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 a password for the system administrator (SA) account
    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.

    登錄后復(fù)制

    配置完成后,我們將重新啟動MS SQL服務(wù),并使用以下命令查看服務(wù)的狀態(tài):

    重新啟動服務(wù)

    # systemctl start mssql-server
    

    登錄后復(fù)制

    查看服務(wù)的狀態(tài)

    # systemctl status mssql-server
    mssql-server.service - Microsoft(R) SQL Server(R) Database EngineLoaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
    Active: active (running) since Fri 2016-12-02 15:52:33 IST; 5min ago
    Main PID: 2299 (sqlservr)
    CGroup: /system.slice/mssql-server.service
    ├─2299 /opt/mssql/bin/sqlservr
    └─2307 /opt/mssql/bin/sqlservr
    Dec 02 15:52:37 localhost.localdomain sqlservr[2299]: 2016-12-02 10:22:37.31 spid17s....
    Dec 02 15:52:37 localhost.localdomain systemd[1]: [/usr/lib/systemd/system/mssql-ser...'
    Dec 02 15:52:37 localhost.localdomain sqlservr[2299]: 2016-12-02 10:22:37.53 spid6s ....
    ..
    ..
    Dec 02 15:57:40 localhost.localdomain sqlservr[2299]: 2016-12-02 10:27:40.21 spid51 ...'
    Dec 02 15:57:43 localhost.localdomain systemd[1]: Started Microsoft(R) SQL Server(R)....Hint: Some lines were eclipsed, use -l to show in full.

    登錄后復(fù)制

    打開 MS SQL 的防火墻

    我們需要打開防火墻設(shè)置,以便可以訪問 MS SQL,以下是打開防火墻的命令

    # sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
    # sudo firewall-cmd –reload

    登錄后復(fù)制

    安裝 MS SQL 工具

    我們需要下載 Microsoft 倉庫。

    # curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
    100 193 100 193 0 0 213 0 --:--:-- --:--:-- --:--:-- 213

    登錄后復(fù)制

    一旦將存儲庫安裝在本地機器上,我們可以使用以下命令安裝MS SQL工具:

    # yum install mssql-tools
    Loaded plugins: fastestmirror
    packages-microsoft-com-prod | 2.9 kB 00:00:00
    packages-microsoft-com-prod/primary_db | 4.6 kB 00:00:00
    Loading mirror speeds from cached hostfile
    * base: mirrors.digipower.vn
    * extras: mirror.digistar.vn
    * updates: mirror.digistar.vn
    Resolving Dependencies
    ========================================================================================
    Package Arch Version Repository Size
    ========================================================================================
    Installing:
    mssql-tools x86_64 14.0.1.246-1 packages-microsoft-com-prod 249 k
    Installing for dependencies:
    libtool-ltdl x86_64 2.4.2-21.el7_2 updates 49 k
    msodbcsql x86_64 13.0.1.0-1 packages-microsoft-com-prod 3.8 M
    unixODBC-utf16 x86_64 2.3.1-1 packages-microsoft-com-prod 329 k
    Transaction Summary
    ========================================================================================
    Install 1 Package (+3 Dependent packages)
    Total download size: 4.5 M
    Installed size: 4.5 M
    Is this ok [y/d/N]: ^CN
    Exiting on user command
    Your transaction was saved, rerun it with:
    yum load-transaction /tmp/yum_save_tx.2016-12-02.17-18.RpEVqg.yumtx
    Do you accept the license terms? (Enter YES or NO)YES
    Installing : msodbcsql-13.0.1.0-1.x86_64 3/4
    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
    Dependency Installed:
    libtool-ltdl.x86_64 0:2.4.2-21.el7_2 msodbcsql.x86_64 0:13.0.1.0-1
    unixODBC-utf16.x86_64 0:2.3.1-1
    Complete!

    登錄后復(fù)制

    連接到 Linux 上的 SQL Server

    在計算機上安裝工具后,我們將測試以下命令和一般語法以連接到 MS SQL Server。

    語法

    # sqlcmd –S IP-ADDRESS –U SA –P ‘<YOUR SYSTEM PASSWORD’
    # sqlcmd sqlcmd -S localhost -U SA -P Test@1234
    1>CREATE DATABASE TEST1;
    2>GO;
    3>quit

    登錄后復(fù)制

    在上面的文章中,我們學(xué)習(xí)了 – 如何安裝 MS SQL Server、MS SQL 命令行工具來連接到服務(wù)器。我們還學(xué)習(xí)了 – 如何更改或設(shè)置 MS SQL 的 SA 帳戶密碼。

    以上就是如何在 CentOS 7 上安裝和配置 MS SQL(測試版)的詳細內(nèi)容,更多請關(guān)注www.92cms.cn其它相關(guān)文章!

分享到:
標簽:MS 如何在 安裝 測試版 配置
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定