Install and Setup MongoDB Database – Local

Mongo DB is one of the most popular noSQL database. In this post we gonna setup MongoDB in a windows machine.

  • Download the Community Server (Free, OpenSource)

  • Now the MSI file – installation setup file for windows can be dowloaded
  • Run the installation wizard, after downloading.

Choose Complete Installation,

Choose Run Service as a Network Service user

(Copy the Data Directory Path and keep the location text in a text file.)

(Uncheck install mongodb compasss)

Create Data folder in drive

This is created for storing the data.

GO to C drive –> Create folder data –> inside that create folder db

Create File in home directory

code .bash_profile

Add the following code:

alias mongod="/c/Program\ files/MongoDB/Server/4.4/bin/mongod.exe"
alias mongo="/c/Program\ Files/MongoDB/Server/4.4/bin/mongo.exe"

Replace 4.4 with your installed version

Refer: https://medium.com/@LondonAppBrewery/how-to-download-install-mongodb-on-windows-4ee4b3493514

Refer the below image to find the exact location on your system, use that path in the above codes.

About the Author: smartcoder

You might like

Leave a Reply

Your email address will not be published. Required fields are marked *