How to install mongodb on windows 7 ?

How to install mongodb on windows 7 ?

How to install mongodb on windows 7 ?

Step 1: Download the MongoDB for windows 7

 

Download MongoDB windows binary files from here,
For windows 7,

Mongodb for windows 7
[Download the zip version not msi]
For windows 2008+ (for windows 10 as well)
Mongodb for Windows 2008+ or windows 10
(Size is around 232MB)

 

Step 2: Extract the folder.

Extract the above downloaded zip file to mongodb folder in C drive.

How to install mongodb on windows 7 ?

 

 

Step 3: Create the folder data\db inside mongodb in C drive.

 

So your mongodb folder in c drive contains basically two folders,

  1. bin folder
    2. data folder inside that you need to create one more folder named db (data\db)

How to install mongodb on windows 7 ?

 

inside bin folder,

How to install mongodb on windows 7 ?

 

inside data folder,

How to install mongodb on windows 7 ?

 

Note: above db folder is empty and ensure it has access.

 

 

Step 4: Start the MongoDB engine using mongod command

Open the command prompt/terminal and Go to this folder from command prompt,

C:\mongodb\bin

Now run the MongoDB engine,

mongod –dbpath c:\mongodb\data\db

 

How to install mongodb on windows 7 ?

 

 

Step 5: Start working with MongoDB

 

Open one more command prompt and start working with MongoDB. (do not close the command prompt opened in the step 4).
C:\mongodb\bin>mongo [enter]

How to install mongodb on windows 7 ?

 

 

How to confirm whether it is working properly or not ?

You can check with any mongodb command, here i just checked with it using

show dbs

If you are getting the below error in step 4, then check the articles attached after this error to resolve it.
2016-12-20T00:57:50.275+0530 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, will zero-out data files
MongoDB shell version: 3.2.11-36-g1ab8780
connecting to: test
2016-12-20T00:57:55.340+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017 after 5000ms milliseconds, giving up.
2016-12-20T00:57:55.340+0530 E QUERY [thread1] Error: couldn’t connect to ser
ver 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6

 

[Resolved] the default storage engine ‘wiredtiger’ is not available

 

[Resolved] W NETWORK [thread1] Failed to connect to 127.0.0.1

 

[Resolved] connect@src/mongo/shell/mongo.js

 

[Resolved] exception in initandlisten mongodb

 

1,988 total views, 1 views today

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.