Install mongodb in mac

MongoDB is a document database, which means it stores data in JSON-like documents. We believe this is the most natural way to think about data, and is much more expressive and powerful than the traditional row/column model.

To install mongodb , follow bellow steps

1)Install home brew in your mac

a)Go to below link , search for below command

https://brew.sh/#install

b)Open cmd and put the command. Below command is to install home brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

c)brew –version (To get the version of home brew)

d)brew tap mongodb/brew

e)brew install mongodb-community (To install mongodb)

Note : wow mongo db installed ♠

f)create the data/db folder

get the current path through (pwd)

/Users/panagar2/

g)Start the server with path name

mongod –path /Users/panagar2/data/db

h)Now start the mongo terminal

open terminal. type below command

mongo

 

Site Footer