mongodbHow to install MongoDB on Debian?
- Download the MongoDB package from the official website: https://www.mongodb.com/download-center/community
- Install the MongoDB package with the following command:
sudo apt-get install -y mongodb-org
- Start the MongoDB service with the following command:
sudo systemctl start mongod
- Check the status of the MongoDB service with the following command:
sudo systemctl status mongod
The output should look like this:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-05-14 11:45:45 UTC; 1min ago
Main PID: 809 (mongod)
Tasks: 23 (limit: 4704)
CGroup: /system.slice/mongod.service
└─809 /usr/bin/mongod --config /etc/mongod.conf
- To enable MongoDB to start on boot, run the following command:
sudo systemctl enable mongod
Related
More of Mongodb
- How to use watch in MongoDB?
- How to check the version of MongoDB?
- How to work with time series data in MongoDB?
- How to update many documents in MongoDB?
- How to update an array element in MongoDB?
- How to use triggers in MongoDB?
- How to use unwind in MongoDB?
- How to list MongoDB users?
- How to remove a field from MongoDB?
- How to use MongoDB queue?
See more codes...