基础网络配置
sudo firewall-cmd --permanent --zone=public --add-port=1433/tcp
sudo firewall-cmd --reload
ping <服务器IP>
,确保网络连通。SQL Server服务配置
/var/opt/mssql/mssql.conf
,确保[network]
中tcpip = true
,并设置正确端口(如tcp_port = 1433
)。sudo systemctl restart mssql-server
。高级网络优化
mssql.conf
中添加[browser]
并设置enable = true
,重启服务。net.core.rmem_max
和net.core.wmem_max
,需结合服务器负载测试调整。安全与监控
ping
、traceroute
或ss -i
命令排查网络异常。注意:SQL Server默认在Windows平台运行,CentOS需通过第三方工具(如mssql-server
包)安装,部分功能可能受限,建议优先在Linux上使用MySQL/PostgreSQL等原生支持的系统。
参考来源: