Última actividad 1724845641

Revisión f56068c463e7d1c259ee376a7345789b52ee6ffc

mssql Sin formato
1
2#Centos安装配置SqlServer  
3https://blog.csdn.net/weixin_43625238/article/details/141333125
4 
5#官方文档  
6https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat?view=sql-server-linux-ver15&tabs=rhel8
7
8#操作部分:
9
10#下载SQL Server2019镜像  
11curl https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo > /etc/yum.repos.d/mssql-server.repo
12
13#安装SqlServer程序包    
14yum install -y mssql-server  
15
16#按照提示安装SqlServer  
17/opt/mssql/bin/mssql-conf setup
18
19#查看运行状态
20systemctl status mssql-server
21
22#开端口  
23sudo firewall-cmd --zone=public --add-port=1433/tcp --permanent
24
25sudo firewall-cmd --reload 
26
27
28
29#安装mssql相关工具包(非必须)
30#下载镜像
31curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/msprod.repo
32
33#安装
34yum install -y mssql-tools unixODBC-devel
35
36#添加环境变量
37echo 'export PATH=$PATH:/opt/mssql-tools/bin' >> /etc/profile
38
39#重新加载环境变量
40source /etc/profile
41
42#本地连接测试  
43[root@hecs-166225 ~]# sqlcmd -S localhost -U sa -p
44Password:
451>
46
47
48
49
50