我正在尝试将mongodb作为一项服务启动,以在操作系统重新启动后启动mongod。
我可以使用
启动mongodb<div id="app"></div>
new Vue({el:"#app"})
new Vue({el:"#app"})
命令,它会启动,但是每当我尝试以
开头时$ mongod
但是它给出了这样的错误
$service mongod start
配置就像这样
root@sahin:~# service mongod status
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-01-23 21:35:51 +03; 4s ago
Docs: https://docs.mongodb.org/manual
Process: 43296 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
Main PID: 43296 (code=exited, status=1/FAILURE)
Jan 23 21:35:51 sahin systemd[1]: Started MongoDB Database Server.
Jan 23 21:35:51 sahin systemd[1]: mongod.service: Main process exited, code=exited, status=1/FAILURE
Jan 23 21:35:51 sahin systemd[1]: mongod.service: Unit entered failed state.
Jan 23 21:35:51 sahin systemd[1]: mongod.service: Failed with result 'exit-code'.
您能看到引起这种情况的东西吗?
答案 0 :(得分:0)
请尝试以下命令
sudo service mongod start