首页 新闻 会员 周边 捐助

Linux下SqlServer无法启动

0
悬赏园豆:100 [待解决问题]

我有一个只有2G内存的CentOS7 服务器 想要安装SQLSERVER
安装是出现了2G内存限制
sqlservr: This program requires a machine with at least 2000 megabytes of memory.
/opt/mssql/bin/sqlservr: This program requires a machine with at least 2000 megabytes of memory

后来根据网上所说的破解内存限制

[root@VM_0_2_centos bin]# mv sqlservr sqlservr.old
[root@VM_0_2_centos bin]# python
Python 2.7.5 (default, Jun 20 2019, 20:27:34)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

... oldfile = open("sqlservr.old", "rb").read()
newfile = oldfile.replace("\x00\x94\x35\x77", "\x00\x80\x84\x1e")
open("sqlservr", "wb").write(newfile)
exit()

破解成功后安装确实可以

Confirm the SQL Server system administrator password:
Configuring SQL Server...

/bin/bash: /opt/mssql/bin/sqlservr: Permission denied
Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service.
Setup has completed successfully. SQL Server is now starting.

但是查看状态一直是未启动状态 也无法启动

● mssql-server.service - Microsoft SQL Server Database Engine
Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2019-08-23 15:05:16 CST; 24s ago
Docs: https://docs.microsoft.com/en-us/sql/linux
Process: 4084 ExecStart=/opt/mssql/bin/sqlservr (code=exited, status=203/EXEC)
Main PID: 4084 (code=exited, status=203/EXEC)

Aug 23 15:05:15 VM_0_2_centos systemd[1]: mssql-server.service: main process exited, code=exited, status=203/EXEC
Aug 23 15:05:15 VM_0_2_centos systemd[1]: Unit mssql-server.service entered failed state.
Aug 23 15:05:15 VM_0_2_centos systemd[1]: mssql-server.service failed.
Aug 23 15:05:16 VM_0_2_centos systemd[1]: mssql-server.service holdoff time over, scheduling restart.
Aug 23 15:05:16 VM_0_2_centos systemd[1]: Stopped Microsoft SQL Server Database Engine.
Aug 23 15:05:16 VM_0_2_centos systemd[1]: start request repeated too quickly for mssql-server.service
Aug 23 15:05:16 VM_0_2_centos systemd[1]: Failed to start Microsoft SQL Server Database Engine.
Aug 23 15:05:16 VM_0_2_centos systemd[1]: Unit mssql-server.service entered failed state.
Aug 23 15:05:16 VM_0_2_centos systemd[1]: mssql-server.service failed.

想请教各位大佬 如何解决这个问题 这个问题已经困扰我太久了
感谢

_你吗B的主页 _你吗B | 初学一级 | 园豆:102
提问于:2019-08-23 15:50
< >
分享
所有回答(2)
0

可以试试用 docker 来安装 sql server

ohyex | 园豆:1696 (小虾三级) | 2019-08-23 16:13
0

别折腾了 还是加内存或者换机器吧
破解内存了并不代表后面使用不会有问题

ycyzharry | 园豆:25683 (高人七级) | 2019-08-24 11:40
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册