我按照这个教程 这里 安装了mongodb,在安装过程中没有出现错误,但是当我尝试使用教程中提到的命令 sudo systemctl start mongodb
启动mongod服务器时,我使用这个命令 sudo systemctl status mongodb
检查是否正在运行时发生了错误。
● mongodb.service - High-performance, schema-free document-oriented
database
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset:
Active: failed (Result: exit-code) since Rab 2016-06-01 18:04:20 MYT; 4s ago
Process: 8241 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (cod
Main PID: 8241 (code=exited, status=14)
Jun 01 18:04:20 yasinya systemd[1]: Started High-performance, schema-free docume
Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Main process exited, code=e
Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Unit entered failed state.
Jun 01 18:04:20 yasinya systemd[1]: mongodb.service: Failed with result 'exit-co
lines 1-10/10 (END)
有人可以告诉我出了什么问题,我该如何修复它吗?
无法启动mongod.service:找不到mongod.service单元
。 - Yya09/var/lib/mongodb/mongod.lock
),然后尝试systemctl start mongodb.service
。 - Pipetus