First download the offline resource package
https://download.csdn.net/download/u014292402/86401518
There are 4 files in the package. Install them in the following order . Otherwise, an error about missing dependent libraries may be reported, resulting in incomplete functionality.
1. First install mssql-server-14.0.3030.27-1.x86_64.rpm
yum localinstall mssql-server-14.0.3030.27-1.x86_64.rpm
Then follow the command line prompts and execute
#配置sqlserver
sudo /opt/mssql/bin/mssql-conf setup
#第一个输入3,选择免费版
#第二个输入你自己的密码
2. Then install unixODBC-utf16-2.3.1-1.x86_64.rpm
yum localinstall unixODBC-utf16-2.3.1-1.x86_64.rpm
3. Then install msodbcsql-13.0.1.0-1.x86_64.rpm
yum localinstall msodbcsql-13.0.1.0-1.x86_64.rpm
4. Finally install mssql-tools-14.0.1.246-1.x86_64.rpm
yum localinstall mssql-tools-14.0.1.246-1.x86_64.rpm
After installation is complete
#找到sqlcmd在哪个目录
find / -name sqlcmd
#执行查找到的文件
${路径}/sqlcmd -U sa
#输入你的密码就可以登陆sqlserver了
================================================== =======
The following is sqlserver to enable remote login
#首先开启防火墙的1433端口
firewall-cmd --zone=public --add-port=1433/tcp --permanent
#重启防火墙
firewall-cmd --reload
In navicat, create a new sqlserver connection
and enter the address, username, and password to connect.