您好,登錄后才能下訂單哦!
這篇文章主要介紹“Centos7.7中怎么安裝SQL Server”的相關知識,小編通過實際案例向大家展示操作過程,操作方法簡單快捷,實用性強,希望這篇“Centos7.7中怎么安裝SQL Server”文章能幫助大家解決問題。
系統版本:Centos7.7 ,內存4G(SQL Server內存要求至少2G),硬盤40G,1核CPU
SQL Server版本:SQL Server 2019,下載地址
SQL Server Management Studio 版本:V18.4,安裝在windows客戶端下載地址,Windows 2008R2(64位)或Windows8.1(64位)以上
關閉SELINUX
[root@localhost ~]# sed -i '/^SELINUX/s/enforcing/disabled/g' /etc/selinux/config && setenforce 0
[root@localhost ~]# curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/msprod.repo[root@localhost ~]# yum -y install mssql-tools unixODBC-devel bzip2 gdb libsss_nss_idmap cyrus-sasl cyrus-sasl-gssapi
下載文章上面提供的SQL Server2019,上傳到服務器并安裝
[root@localhost ~]# rpm -ivh mssql-server-15.0.4003.23-3.x86_64.rpmPreparing... ################################# [100%]Updating / installing... 1:mssql-server-15.0.4003.23-3 ################################# [100%]+--------------------------------------------------------------+ Please run 'sudo /opt/mssql/bin/mssql-conf setup'to complete the setup of Microsoft SQL Server +--------------------------------------------------------------+
[root@localhost ~]# /opt/mssql/bin/mssql-conf setupusermod: no changes Choose an edition of SQL Server: 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 #這里選擇了Express版本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 Do you accept the license terms? [Yes/No]:Yes #輸入Yes接受許可條目Enter the SQL Server system administrator password: #設置SA管理員密碼Confirm the SQL Server system administrator password: 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. Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service. Setup has completed successfully. SQL Server is now starting.
[root@localhost ~]# echo 'export PATH=$PATH:/opt/mssql-tools/bin' > /etc/profile.d/mssql.sh[root@localhost ~]# source !$source /etc/profile.d/mssql.sh
[root@localhost ~]# firewall-cmd --permanent --add-service=mssqlsuccess [root@localhost ~]# firewall-cmd --reloadsuccess
[root@localhost ~]# sqlcmd -S localhost -U saPassword:# 顯示系統數據庫1> select name,database_id from sys.databases;# 執行2> go name database_id -------------------------------------------------------------------------------------------------------------------------------- ----------- master 1 tempdb 2 model 3 msdb 4 (4 rows affected)# 查看軟件版本1> SELECT @@VERSION 2> go ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Microsoft SQL Server 2019 (RTM-CU1) (KB4527376) - 15.0.4003.23 (X64) Dec 6 2019 14:53:33 Copyright (C) 2019 Microsoft Corporation Express Edition (64-bit) on Linux (CentOS Linux 7 (Core)) (1 rows affected) 1>
安裝上面提供的SSMS管理軟件,安裝完成之后搜索”ssms”,打開該管理軟件 輸入服務器地址,身份驗證選擇“SQL Server身份驗證”,輸入用戶名密碼,然后連接。 查看一下SQL Server版本
關于“Centos7.7中怎么安裝SQL Server”的內容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業相關的知識,可以關注億速云行業資訊頻道,小編每天都會為大家更新不同的知識點。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。