CentOS7下安装SQL SERVER linux版
1.下载微软yum源
#server
curl https://packages.microsoft.com/config/rhel/7/mssql-server.repo > /etc/yum.repos.d/mssql-server.repo
#tools
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
2.yum安装
yum install -y mssql-server
3.执行脚本初始化并启动数据库
/opt/mssql/bin/sqlservr-setup
最新版
/opt/mssql/bin/sqlservr-setup改为用/opt/mssql/bin/mssql-conf setup
4.确认是否启动成功
systemctl status mssql-server
5.如果有防火墙的,请添加1433端口例外
sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
sudo firewall-cmd --reload
6.安装sql server官方连接工具
yum install mssql-tools
7.可以命令行尝试连接了
sqlcmd -S localhost -U SA -P '<YourPassword>' #注: SQL Server name (-S), the user name (-U), and the password (-P).
8.完成!拿起你擅长的T-SQL武器吧!
posted on 2019-01-29 03:26 fanderchan 阅读(331) 评论(0) 编辑 收藏 举报