MongoDB应用

  1. Ubuntu安装MongDB后启动报错
    使用的是windows sub system的Ubuntu,用sudo apt install mongodb安装mongDB,这样安装的不是官方最新版本,但是简单。然后查看状态sudo apt install mongodb报错:

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

可以尝试用sudo /etc/init.d/mongodb status

  • Checking status of database mongodb [fail]

这样表示未启动。用sudo /etc/init.d/mongodb start启动就好了。

你可能感兴趣的:(MongoDB应用)