mongodb



Step 2 — Checking the Service and Database


sudo systemctl status mongodb


mongo --eval 'db.runCommand({ connectionStatus: 1 })'

Step 3 — Managing the MongoDB Service

  • sudo systemctl status mongodb
You can stop the server anytime by typing:
  • sudo systemctl stop mongodb
To start the server when it is stopped, type:
  • sudo systemctl start mongodb
You can also restart the server with a single command:
  • sudo systemctl restart mongodb
By default, MongoDB is configured to start automatically with the server. If you wish to disable the automatic startup, type:
  • sudo systemctl disable mongodb
It’s just as easy to enable it again. To do this, use:
  • sudo systemctl enable mongodb

Comments

Post a Comment

Popular posts from this blog

Installation of JDK 8, R,R Studio,sbt, scala, spark

INSTALLATION R and Rstudio IN UBUNTU 18.04