How to install MongoDB on windows OS, In this post we will learn How to Install MongoDB to our personal computer. In order to install MongoDB to windows PC we have to download the installer package of MongoDB from MongoDB official site. The link is given below, you simply click it, go to the MongoDB site and download the installer file. Start MongoDB windows Download MongoDB for windows 7 32 bit zip, Download MongoDB for windows 7 64 bit zip, Install MongoDB as a service, Download MongoDB for windows 10 64 bit zip, How to install MongoDB on windows 7, MongoDB Shell Commands

MongoDb Tutorial : How to Install MongoDB?

MongoDb Tutorial : How to Install MongoDB?


Hello World! Welcome to MongoDB Tutorial Series. In this post we will learn  How to Install MongoDB to our personal computer. In order to install MongoDB to windows PC we have to download the installer package of MongoDB from MongoDB official site. The link is given below, you simply click it, go to the MongoDB site and download the installer file.
Remember : The installer package available on MongoDB site is only for 64-bit OS architecture.

How to check the OS Architecture ?

In order to check your Windows OS architecture you can go through these options. Try any one of these and know your system OS architecture.

1. Check the Properties of My Computer like show in below image:


MongoDB Tutorial - How to get OS Architecture in Windows 7 using MyComputer Properties.jpg
MongoDB Tutorial - How to get OS Architecture in Windows 7 using MyComputer Properties.jpg

or


2. Go to Command and Type ‘wmic os get osarchitecture’ and press enter you will get the OS architecture as shown in below figure :

MongoDB Tutorial - How to get OS Architecture in Windows 7 using DOS Commands.jpg
MongoDB Tutorial - How to get OS Architecture in Windows 7 using DOS Commands.jpg

or
3. At last open ‘Run’ and type ‘dxdiag’ and press enter, Direct-X diagnostic tool will be open where you can find the OS architecture:

MongoDB Tutorial - How to get OS Architecture in Windows 7 using Direct-X Tool.jpg
MongoDB Tutorial - How to get OS Architecture in Windows 7 using Direct-X Tool.jpg

Download Mongodb for Windows OS 64-Bit

The following tutorial uses the MongoDB installation wizard to install MongoDB Community Edition 4.0 on Windows 64-Bit OS.
Download MongoDB Community Edition 4.0.12 for Windows 64-Bit OS
Download MongoDB Community Edition with Multiple Choice

Download Mongodb for Windows 7 32-Bit

If you want to install MongoDB for Windows 7 32-bit then click the below link and download the package.
Download MongoDB Other Version Binaries
Note : To work better it is preferred to install Window 7 Service Pack 1 for 32-bit OS architecture. To download the same click the below link:
Window 7 Service Pack All in One
Above link might not work after 14th January 2020. Therefore keep back-up also.

Remember : 32-bit version of MongoDB only supports database smaller then 2GB and strongly preferred for study and testing purpose only.

MongoDB Installation Procedure

After downloading the installer (.msi file) package you have to run this package, so click the double click the installer file and follow the installation wizard. You will be asked to choose the set type : Complete (recommended for most users)  or Custom. If you choose the Custom installation option, you may have to specify the location of installation file.
After that you will be asked to choose the type of service configuration like shown in below image. If you want to install the MongoDB binaries only then uncheck the check box or if you want to run install MongoDB as service then you need to check the checkbox.

MongoDB install Binaries only or Install as service
MongoDB install Binaries only or Install as service


MongoDB install as service : This configuration allows you to configure MongoDB as service. Every time you start window MongoDB initialized automatically.
  • Run the service as Network Service user (Default) :This is a Windows user account that is built-in to Windows.
  • Run the service as a local or domain user
    • For an existing local user account, specify a period (i.e. ) for the Account Domain and specify the Account Name and the Account Password for the user.
    • For an existing domain user, specify the Account Domain, the Account Name and the Account Password for that user.
MongoDB install binaries only : With this configuration you have to start MongoDB manually every time when starting the windows.

Service Name : Specify the service name. Default name is MongoDB. If you already have a service with the specified name, you must choose another name.

Data Directory : Specify the data directory, which corresponds to the --dbpath. If the directory does not exist, the installer will create the directory and sets the directory access to the service user.

Log Directory : Specify the Log directory, which corresponds to the --logpath. If the directory does not exist, the installer will create the directory and sets the directory access to the service user.


How to set up path for Window 7 32-Bit ?

In Window 32-Bit installation it is little bit difficult to set the path to run MongoDB instance. So you have be care full while setting the path in commands. First you have to run Command as Administrator.

How to start Command as Administrator?

To start command as Administrator click on ‘start menu’ and type ‘cmd’ in search program. You will find the command black icon in start menu list. Right click on command icon and click on ‘Run as Administrator’.  You will come to command prompt : c:\windows\system32. For you reference image is attached.

How to start Command as Administrator?
How to start Command as Administrator?


In MongoDB 32-bit, your default installation file location will be ‘C:\Program Files\MongoDB\Server\3.2\bin’ unless you customize it. Therefore go inside the bin directory of the installation file location in command like shown in below image.

How to setup path of MongoDB in Window 7 32-Bit
How to setup path of MongoDB in Window 7 32-Bit


Now go to path C:\Program Files\MongoDB\Server\3.2 and create two folders. First folder name should be ‘data’ and second should be ‘log’. Also inside the data directory create another folder names ‘db’. After create these folders go back to command prompt and type(show in below images) : mongod.exe --storageEngine=mmapv1 --dbpath C:\Program Files\MongoDB\Server\3.2\data\db --logpath C:\Program Files\MongoDB\Server\3.2\log\mongo.log --logappend --rest --install



How to setup dbpath of MongoDB in Window 7 32-Bit
How to setup dbpath of MongoDB in Window 7 32-Bit


This post will be in continuing. Please check letter for updates. If you any query please type in the comments. We feel glad to help you. Thank you and have nice day...!


Related Topics


What Is MongoDB? : Introduction, MongoDB Architecture, NoSQL Concept And Comparison With SQL Database

 


progrramers-logo

progrramers

Hello friends! Progrramers is a tutorial site of w3 programming. If you like this tutorial site please encourages us by sharing this site links with your friends and nears & dears who want to learn web development and give us like on our Facebook page. If have any question please type in to comment box or send us message on social media sites via below given social links. Thank you, have a nice learning.

Post A Comment:

1 comments:

  1. Nice post. Thanks for sharing! I want people to know just how good this information is in your blog. It’s interesting content and Great work.
    machine learning training in hyderabad
    data science course in hyderabad
    business analytics courses in hyderabad

    ReplyDelete