共計 1163 個字符,預計需要花費 3 分鐘才能閱讀完成。
這篇文章主要介紹在 Linux 7 上如何通過官方 Repo 在線安裝 SQL Server 2017,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
掛載數據盤
#vgdispaly 的 Total PE
安裝 SQL Server 服務端
1. 下載 SQL Server Red Hat Repository 配置文件:
curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
2. 安裝 SQL Server 實例
yum install -y mssql-server
3. 運行 mssql-conf setup 按照提示配置,選擇版本、設置 SA 密碼。
/opt/mssql/bin/mssql-conf setup
4. 驗證服務是否正常運行:
systemctl status mssql-server
5. 禁用 firewalld
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
6. 禁用 selinux
getenforce
setenforce 0
vi /etc/sysconfig/selinux
修改 SELINUX 值為 disabled
安裝 SQL Server 命令行工具
若要創建數據庫時,需要使用一種工具,可以在 SQL Server 上運行的 Transact SQL 語句進行連接。以下是 SQL Server 命令行工具:sqlcmd 和 bcp。
1. 下載 Red Hat Repo 配置文件。
curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
2. 卸載舊版的 unixODBC 包。
yum remove unixODBC-utf16 unixODBC-utf16-devel
3. 安裝命令行工具
yum install -y mssql-tools unixODBC-devel
4. 將 /opt/mssql-tools/bin/ 添加到 PATH 環境變量。
echo export PATH= $PATH:/opt/mssql-tools/bin ~/.bash_profile
echo export PATH= $PATH:/opt/mssql-tools/bin ~/.bashrc
source ~/.bashrc
本地連接
以上是“在 Linux 7 上如何通過官方 Repo 在線安裝 SQL Server 2017”這篇文章的所有內容,感謝各位的閱讀!希望分享的內容對大家有幫助,更多相關知識,歡迎關注丸趣 TV 行業資訊頻道!