Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### To install mongodb
- ```bash
- sudo apt update && sudo apt upgrade -y
- sudo apt install mongodb
- ```
- ### To check the status type
- ```bash
- sudo systemctl status mongodb
- ```
- ### MongoDB is a systemd service, To check and modify it’s state :
- ```bash
- sudo systemctl status mongodb
- sudo systemctl stop mongodb
- sudo systemctl start mongodb
- sudo systemctl restart mongodb
- ```
- ### You can also change if MongoDB automatically starts when the system starts up (default: enabled):
- ```bash
- sudo systemctl disable mongodb
- sudo systemctl enable mongodb
- ```
- ### To start working with (creating and editing) databases, type:
- ```bash
- mongo
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement