如何将服务 mssql-server 设置为在启动时启动
root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d mssql-server enable
update-rc.d: error: cannot find a LSB script for mssql-server
root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d system.ctl mssql-server enable
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force
The disable|enable API is not stable and might change in the future.
root@ubuntu-s-1vcpu-2gb-lon1-01:/etc/init.d# update-rc.d system.ctl mssql-server -f
usage: update-rc.d [-n] [-f] <basename> remove
update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
-n: not really
-f: force
如果您使用的是 Ubuntu 16.04,如问题标签中所述,您应该改用 systemctl。要在启动时启用服务:
要在启动时禁用该服务:
也许服务名称是 mssql-server,所以先尝试使用 mysql,然后使用 mysqld