110. Working With the Mongo Shell

preview_player
Показать описание
Week 3: Day 2
Section 12: Intro to Node, Mongo, & REST APIs
Tutorial 110: Working With the Mongo Shell

In this video tutorial, we are going to learn how to install MongoDB on Mac OS using Homebrew. MongoDB is a document-oriented database program. It uses JSON like documents. You can store your data without worrying about the data structure. Homebrew is a free and open-source software package management. It simplifies the installation of software on Apple Mac OS.

STEPS INVOLVED:
Installation of homebrew
Update homebrew
Open the terminal app and type in the command: brew update
Install MongoDB
Open homebrew after updating and type in the following command: brew install MongoDB
Create the data directory
After downloading MongoDb, create the default directory ‘db’. It is the default location where all of your files and collections created on the MongoDB platform will be stored. To create a data directory type in the following command: mkdir-p/data/db

Set permission for the data directory
Make sure that all the permissions are set for the /data/db to run smoothly in your system. In order to do this type in the following: chmod ugo+rwx/data/db
Run MongoDB
To start the MongoDB server, type: mongod in your terminal application on your Mac.
Once the Mongo server is started, open another terminal window and type in the command: mongo(without the path). This will start the Mongo shell and this will give you application access to the data you create on the MongoDB platform.
To quit the Mongo shell, type: quit()
After this press ctrl+c on your mac keyboard to stop the MongoDB server.

Full Stack Web Development in Just 3 weeks
Published by WB Web, Under free promotions,
Watch All the videos for free for a limited time.
You can buy the course from Udemy for lifetime access.

Udemy Course Link:

Content Credit: Mark Price

Hosted By
WB Web Development Solutions
Рекомендации по теме
Комментарии
Автор

what if i am a window user, i mean how do i install homebrew?

VidishArvind