Mongodb 4:无法启动mongod.service:找不到单元mongod.service
我正在尝试在Ubuntu 15.10上安装mongodb 4,但是当我启动mongod时,它给了我这个错误:
I am trying to install mongodb 4 on Ubuntu 15.10 but its giving me this error when I start mongod:
Failed to start mongod.service: Unit mongod.service not found
我遵循了此官方安装指南:
I followed this official installation guide:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
没有针对Ubuntu 15.10的正式安装说明
There is no official installation instructions for Ubuntu 15.10
我可以在Ubuntu 16上成功安装,但是在Ubuntu 15.10上却遇到了问题.
I was successfully able to install on Ubuntu 16 but I am getting issues on Ubuntu 15.10.
由于正式不支持ubuntu 15,因此您可能已经安装了ubuntu 14或16的版本.
Since ubuntu 15 isn't officially supported, you might have installed either the version for ubuntu 14 or 16.
Ubuntu可能将init系统升级到upstart/systemd(大约v15). ubuntu 14的mongo版本可能会有所不同,因为它是为不同的init系统打包的.
Ubuntu possibly upgraded the init system to upstart/systemd (around v15). It's possible that the mongo release for ubuntu 14 varies as in it's packaged for a different init system.
您可以编写自己的初始化脚本并将其安装到/etc/init.d
中.或者使用诸如supervisor
的过程控制系统.
You could write your own init script and install it into /etc/init.d
. Alternatively using process control systems like supervisor
.
您的另一种选择(可能在安全方面可能更好)是获得新服务器并在那里迁移.可以在不停机的情况下完成此操作.
Your other option (probably better for security) is to get a new server and migrate there. It could be potentially done without downtime.