![在 ubuntu 机器上启用 systemctl 服务时出错](https://linux22.com/image/1207495/%E5%9C%A8%20ubuntu%20%E6%9C%BA%E5%99%A8%E4%B8%8A%E5%90%AF%E7%94%A8%20systemctl%20%E6%9C%8D%E5%8A%A1%E6%97%B6%E5%87%BA%E9%94%99.png)
我的 systemctl 服务显示已禁用。我希望我的服务在重启后自行启动。
service mongoport status
● mongoport.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongoport.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: https://docs.mongodb.org/manual
我尝试启用该服务但出现此错误,在启用该服务之前我是否遗漏了什么。
systemctl enable mongoport.service
Synchronizing state of mongoport.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mongoport
update-rc.d: error: mongoport Default-Start contains no runlevels, aborting.