Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rupeshtiwari/2eaa1b40e5bdd23de27fef3289bc92f4 to your computer and use it in GitHub Desktop.
Save rupeshtiwari/2eaa1b40e5bdd23de27fef3289bc92f4 to your computer and use it in GitHub Desktop.
Mongo DB Installation Guide For MAC & Windows

MongoDB Full Course For Beginners

MongoDB Full Course For Beginners

Introduction MongoDB

In this course I will teach you guys everything you need to know to get started with MongoDB.

Benefits of MongoDB

  • Cross platform,
  • Open source
  • Document oriented
  • NoSql
  • Fast
  • Flexible (no need to match any data type)

What do you learn in this course

  • Installation
  • Settings
  • Creating Collection ( DB Table )
  • Insert
  • Find
  • Query
  • Filter
  • Update
  • Text Searching
  • Bulk Operation
  • Aggregation

By the end of this session Solid understanding of how MongoDB Works And you should be ready to start building your first database using MongoDB.

Mac Installation MongoDB

Now you will learn everything about installing MongoDB in Mac.

Homebrew for MAC

Is a package manager for MAC it helps u to install and manage other programs. Search for Homebrew in Google/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"Go To Terminal and past it in your terminal Enter password.

MongoDB Install in MAC

Then open terminal type below script and it will install and do the configuration for mongodb. brew install mongodb

To confirm MongoDB is installed run below script mongo --version

Mongo Compass Install in MAC

https://docs.mongodb.com/compass/master/install/ Once installed

Configuring MongoDB in MAC

Create a data folder where MongoDB will store all of its files then set the path to mongodb using below command.

mongod --dbpath c:/data

Start MongoDB Server

Next open a terminal and run mongod so that mongo server is keep running then.

Connecting to MongoDB Server

Keep the mongo server terminal running. Therefore, Right Click to terminal icon and select new window and run below command you will see mongo db shell is running.

mongo --hpost localhost:27017

Now you have MongoDB Server running and also you are connected to the server you are ready to create collections. We will see that next.

Windows Installation MongoDB

Install MongoDB community server and MongoDB Compass User Interface

Download & Install MongoDB in Winodows

  1. Make sure you update the environment variable both system and user path with bin folder location of mongo db. C:\Program Files\MongoDB\Server\4.0\bin
  2. Make sure you have created or it already get created db folder at this location: C:\data\db
  3. Make sure your mongodb server is running if not then open cmd and run below script mongod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment