Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  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. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement