centos7部署SqlServer2019的實現(xiàn)步驟
一 關(guān)于SQL Server
SQL Server數(shù)據(jù)庫是Microsoft開發(fā)設(shè)計的一個關(guān)系數(shù)據(jù)庫智能管理系統(tǒng)(RDBMS)。
二 安裝部署
2.1 安裝依賴 Python3
wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz tar -xvf Python-3.6.6.tar.xz cd Python-3.6.6 ./configure --prefix=/home/app/Python-3.6.6 make && make install ln -s /home/app/Python-3.6.6/bin/python3.6 /usr/bin/python3
2.2 安裝mssql-server-2019
2.2.1 安裝mssql-server
wget -O /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo yum install -y mssql-server
2.2.2 配置安裝信息
在指定位置輸入要安裝的版本號和管理員賬號SA的密碼:
[root@test66 server2019]# /opt/mssql/bin/mssql-conf setup Choose an edition of SQL Server: #仔細(xì)閱讀每個版本的說明,選擇適合自己的而版本,這里選擇安裝 3)Express (free) 1) Evaluation (free, no production use rights, 180-day limit) 2) Developer (free, no production use rights) 3) Express (free) 4) Web (PAID) 5) Standard (PAID) 6) Enterprise (PAID) - CPU Core utilization restricted to 20 physical/40 hyperthreaded 7) Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum 8) I bought a license through a retail sales channel and have a product key to enter. Details about editions can be found at https://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409 Use of PAID editions of this software requires separate licensing through a Microsoft Volume Licensing program. By choosing a PAID edition, you are verifying that you have the appropriate number of licenses in place to install and run this software. Enter your edition(1-8): 3 ##輸入上邊自己要安裝的版本對應(yīng)的數(shù)字 The license terms for this product can be found in /usr/share/doc/mssql-server or downloaded from: https://go.microsoft.com/fwlink/?LinkId=2104294&clcid=0x409 The privacy statement can be viewed at: https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409 Enter the SQL Server system administrator password: #輸入管理員賬號SA的密碼,密碼長度八位以上,且密碼必須包含數(shù)字、字母和特殊字符 Confirm the SQL Server system administrator password: #確認(rèn)密碼 Configuring SQL Server... The licensing PID was successfully processed. The new edition is [Express Edition]. ForceFlush is enabled for this instance. ForceFlush feature is enabled for log durability. Setup has completed successfully. SQL Server is now starting.
2.2.3 檢查啟動狀態(tài):
systemctl status mssql-server
查看啟動端口
三 安裝命令行工具
3.1 卸載服務(wù)器上老版本unixODBC-utf16-devel (如有)
yum remove unixODBC-utf16 unixODBC-utf16-devel
3.2 安裝unixODBC-devel
wget -O /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
yum安裝,兩處交互信息都輸入YES
[root@test66 tools]# yum install -y mssql-tools unixODBC-devel ....... #省略若干行 Warning: RPMDB altered outside of yum. Installing : unixODBC-2.3.7-1.rh.x86_64 1/4 The license terms for this product can be downloaded from https://aka.ms/odbc17eula and found in /usr/share/doc/msodbcsql17/LICENSE.txt . By entering 'YES', you indicate that you accept the license terms. Do you accept the license terms? (Enter YES or NO) YES #輸入YES Installing : msodbcsql17-17.9.1.1-1.x86_64 2/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 #輸入YES Installing : mssql-tools-17.9.1.1-1.x86_64 3/4 Installing : unixODBC-devel-2.3.7-1.rh.x86_64 4/4 Verifying : unixODBC-2.3.7-1.rh.x86_64 1/4 Verifying : unixODBC-devel-2.3.7-1.rh.x86_64 2/4 Verifying : msodbcsql17-17.9.1.1-1.x86_64 3/4 Verifying : mssql-tools-17.9.1.1-1.x86_64 4/4 Installed: mssql-tools.x86_64 0:17.9.1.1-1 unixODBC-devel.x86_64 0:2.3.7-1.rh Dependency Installed: msodbcsql17.x86_64 0:17.9.1.1-1 unixODBC.x86_64 0:2.3.7-1.rh
3.3 設(shè)置環(huán)境變量
echo "export PATH=$PATH:/opt/mssql-tools/bin" >> /etc/profile source /etc/profile
四 驗證數(shù)據(jù)庫
4.1 登錄數(shù)據(jù)庫
[root@test66 tools]# sqlcmd -S localhost -U SA -p Password: 1>
4.2 創(chuàng)建測試庫
1> CREATE DATABASE [SRE] 2> GO
4.3 查看所有database
1> SELECT [NAME] FROM SYS.DATABASES 2> GO
4.4 刪除數(shù)據(jù)庫
1> DROP DATABASE SRE 2> GO
到此這篇關(guān)于centos7部署SqlServer2019的實現(xiàn)步驟的文章就介紹到這了,更多相關(guān)centos7部署SqlServer2019內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
MSSQL 2005/2008 日志壓縮清理方法小結(jié)
本教程會詳細(xì)介紹下MSSQL 2005和MSSQL 2008刪除或壓縮數(shù)據(jù)庫日志的方法,感興趣的朋友可以參考下哈,希望可以幫助到你2013-03-03將表里的數(shù)據(jù)批量生成INSERT語句的存儲過程 增強(qiáng)版
這篇文章主要介紹了將表里的數(shù)據(jù)批量生成INSERT語句的存儲過程 增強(qiáng)版的相關(guān)資料,需要的朋友可以參考下2015-12-12sql server中的任務(wù)調(diào)度與CPU深入講解
這篇文章主要給大家介紹了關(guān)于sql server中任務(wù)調(diào)度與CPU的相關(guān)資料,文中通過圖文以及示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-05-05sqlserver數(shù)據(jù)庫服務(wù)器讀寫性能之陣列RAID對比簡介
這篇文章主要考慮sqlserver數(shù)據(jù)庫服務(wù)器的讀寫性能優(yōu)化之陣列raid的對比分析,需要的朋友可以參考下2024-04-04基于SQL Server OS的任務(wù)調(diào)度機(jī)制詳解
本篇文章小編為大家介紹,基于SQL Server OS的任務(wù)調(diào)度機(jī)制詳解。需要的朋友參考下2013-04-04解讀SQL一些語句執(zhí)行后出現(xiàn)異常不會回滾的問題
這篇文章主要介紹了解讀SQL一些語句執(zhí)行后出現(xiàn)異常不會回滾的問題,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-04-04sql server實現(xiàn)在多個數(shù)據(jù)庫間快速查詢某個表信息的方法
這篇文章主要介紹了sql server實現(xiàn)在多個數(shù)據(jù)庫間快速查詢某個表信息的方法,結(jié)合實例形式分析了SQL Server多個數(shù)據(jù)庫查詢的相關(guān)操作技巧,代碼備有詳盡的注釋,需要的朋友可以參考下2017-03-03