Mongodb 4: Failed to start mongod.service: Unit mongod.service not found

对着背影说爱祢 提交于 2019-12-11 09:08:13

问题


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/

There is no official installation instructions for Ubuntu 15.10

I was successfully able to install on Ubuntu 16 but I am getting issues on Ubuntu 15.10.


回答1:


Since ubuntu 15 isn't officially supported, you might have installed either the version for ubuntu 14 or 16.

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.

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.




回答2:


If Ubuntu 16 isn't working for you, and you need to go back in time to an earlier version, I would choose the previous Long Term Support version, so the last 14.x rather than 15.x.

You are correct in using Mongo 3.6 with Meteor, there are likely to be compatibility issues with 4.0



来源:https://stackoverflow.com/questions/53889589/mongodb-4-failed-to-start-mongod-service-unit-mongod-service-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!