Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Mongodb on windows 7 - 64 bit

Tags:

mongodb

I am new to mongodb and not getting how to install it since i dint find videos or any helpful resources to achieve the same. Please help me for installing mongodb on windows 7 with the exact steps. I tried downloading recent version of mongodb from the site and its unsuccessful. Thanks in adcance.

Regards,

Vijay

like image 483
Vijay Avatar asked May 10 '16 05:05

Vijay


People also ask

Which MongoDB version is suitable for Windows 7?

MongoDb for 64 bit Windows This version of MongoDB runs only on newer version of Windows contains 64 bit operating system. for example: Window Server 2008 R2, Window 7 64 bit etc.

Is MongoDB available for Windows 7 32 bit?

MongoDB is available in both the versions which support their respective 32-bit & 64-bit windows.

How do I download and install MongoDB on Windows?

Go to link and Download MongoDB Community Server. We will install the 64-bit version for Windows. Click on the “complete” button to install all of the components. The custom option can be used to install selective components or if you want to change the location of the installation.


1 Answers

Steps:

  1. Download MongoDB this link link.
  2. Review MongoDB folder.

    In MongoDB, it contains only executable files 10 Plus(exe) in the bin folder. This is true, and That are the required files to MongoDB, it's really hard to believe for a developer like me Who eats from a relation database background.

    path:- Files under $MongoDB/bin folder
    
  3. Configuration File

    Create a MongoDB config file, it’s just a text file, for example C:\mongodb\mongo.config:

    #store data here
    dbpath=C:\mongodb\data
    
    \\all output go here
    logpath=C:\mongodb\log\mongo.log
    
    \\log read and write operations
    diaglog=3
    
  4. Run MongoDB server

    Use mongod.exe --config C:\mongodb\mongo.config to start MongoDB server.

    C:\mongodb\bin>mongod --config C:\mongodb\mongo.config
    

    All output going to: C:\mongodb\log\mongo.log

  5. Connect to MongoDB

    Uses mongo.exe to connect to the started MongoDB server.

    C:\mongodb\bin>mongo MongoDB shell version: 2.2.3 connecting to: test

    //mongodb shell

  6. MongoDB as Windows Service

    Add MongoDB as Windows Service, so that MongoDB will start automatically following each system restart. Install as Windows Service with --install.

    C:\mongodb\bin> mongod --config C:\mongodb\mongo.config --install
    

    A Windows service named “MongoDB” is created.

    To start MongoDB Service:

    net start MongoDB
    

    To stop MongoDB Service

    net stop MongoDB
    

    To remove MongoDB Service

    C:\mongodb\bin>mongod --remove
    

    Reference Link Install Mongodb

like image 121
Anuraj Mahajan Avatar answered Nov 09 '22 14:11

Anuraj Mahajan