SHARE
TWEET

Untitled

a guest Aug 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ### To install mongodb
  2. ```bash
  3. sudo apt update && sudo apt upgrade -y
  4. sudo apt install mongodb
  5. ```
  6.  
  7. ### To check the status type
  8.  
  9. ```bash
  10. sudo systemctl status mongodb
  11. ```
  12.  
  13.  
  14. ### MongoDB is a systemd service, To check and modify it’s state :
  15. ```bash
  16. sudo systemctl status mongodb
  17. sudo systemctl stop mongodb
  18. sudo systemctl start mongodb
  19. sudo systemctl restart mongodb
  20. ```
  21.  
  22. ### You can also change if MongoDB automatically starts when the system starts up (default: enabled):
  23. ```bash
  24. sudo systemctl disable mongodb
  25. sudo systemctl enable mongodb
  26. ```
  27.  
  28. ### To start working with (creating and editing) databases, type:
  29. ```bash
  30. mongo
  31. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top