ubuntu 16.04 无法启动mongodb


问题描述

今天, 打开好久没有用的mongodb, 发现无法启动.

$ sudo service mongodb start

提示错误: Failed to start mongod.service: Unit mongodb.service is masked.

解决方法

google搜索, 找到了如下解决方案. ^1

$ sudo systemctl unmask mongodb
Removed /etc/systemd/system/mongodb.service.

$ sudo service mongodb enable
Usage: /etc/init.d/mongodb {start|stop|force-stop|restart|force-reload|status}

$ sudo service mongodb start

终于解决了, 完美 :))


参考文档


Author: Itaken
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Itaken !
  TOC目录