Various methods are available online to install and use MongoDB on Ubuntu. However following are the least steps one can use to achieve this purpose.
Steps:
1. Open the terminal and type:
sudo apt-get install mongodb
Enter password.
2. Copy paste:
sudo apt-get update
3. Start mongodb service. Type:
sudo service mongodb start
4. Open mongodb.
mongo
5. Use mongo commands. Let's start with:
show dbs
6. Exit mongo.
exit
7. After using, it is recommended that we stop the service. For this, type:
sudo service mongodb stop
Steps:
1. Open the terminal and type:
sudo apt-get install mongodb
Enter password.
2. Copy paste:
sudo apt-get update
3. Start mongodb service. Type:
sudo service mongodb start
4. Open mongodb.
mongo
5. Use mongo commands. Let's start with:
show dbs
6. Exit mongo.
exit
7. After using, it is recommended that we stop the service. For this, type:
sudo service mongodb stop
Comments
Post a Comment