版权声明:转载原创文章请以超链接形式请注明原文章出处,尊重作者,尊重原创!
恰饭广告
亲测:1核1GB也能安装SQL Server 贫民也能拥有它
离线下载rpm
wget https://packages.microsoft.com/rhel/7/mssql-server-2017/mssql-server-14.0.3030.27-1.x86_64.rpm
安装
yum localinstall mssql-server-14.0.3030.27-1.x86_64.rpm
进入sqlserver 目录
cd /opt/mssql/bin/
备份文件
mv sqlservr sqlservr.old
python修改内存限制为512M
python >>> oldfile = open("sqlservr.old", "rb").read() >>> newfile = oldfile.replace("\x00\x94\x35\x77", "\x00\x80\x84\x1e") >>> open("sqlservr", "wb").write(newfile) >>> exit()
添加权限
chmod 755 sqlservr
执行配置
MSSQL_LCID='2052' MSSQL_COLLATION='Chinese_PRC_CI_AS' /opt/mssql/bin/mssql-conf setup
Enter your edition(1-8): 2
注意:这里我选择了2 (键入数字2 回车)Developer (free, no production use rights)
Do you accept the license terms? [Yes/No]:Yes
Enter the SQL Server system administrator password:
注意:键入你的密码,密码必须至少包含 8 个字符,并包含以下四种字符集中的任意三种: 大写字母、小写字母、数字和符号
查看启动状态
systemctl status mssql-server
设置中文字符排序
systemctl stop mssql-server
/opt/mssql/bin/mssql-conf set-collation
Chinese_PRC_CI_AS
systemctl start mssql-server
防火墙开启1433端口(还有服务商的安全组端口)
firewall-cmd --zone=public --add-port=1433/tcp --permanent
firewall-cmd --reload
打开本地的SQL server ,输入ip地址,账号为sa,密码为之前设的
原文链接:https://www.idaobin.com/archives/2284.html
让我恰个饭吧.ヘ( ̄ω ̄ヘ)
恰饭广告