![如何设置服务 mssql-server 在启动时启动?](https://linux22.com/image/1091835/%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E6%9C%8D%E5%8A%A1%20mssql-server%20%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%97%B6%E5%90%AF%E5%8A%A8%EF%BC%9F.png)
如何将服务 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
答案1
如果您使用的是 Ubuntu 16.04,如问题标签中所述,则应改用 systemctl。要在启动时启用该服务:
systemctl enable mssql
要在启动时禁用该服务:
systemctl disable mssql
也许服务名称是 mssql-server,因此先尝试使用 mysql,然后尝试使用 mysqld