Install Mongodb on windows 7 - 64 bit

I am new to mongodb and do not get how to install it, since I dint to find a video or any useful resources to achieve the same. Please help me install mongodb on windows 7 with exact steps. I tried to download the latest version of mongodb from the site and its failure. Thank you for your participation.

Hi,

Vijay

+6
source share
2 answers

Steps:

  • Download MongoDB this link link .
  • Browse the MongoDB folder.

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

    path:- Files under $MongoDB/bin folder 
  • Configuration file

    Create a MongoDB configuration file, its 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 
  • Launch MongoDB Server

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

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

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

  • Connect to MongoDB

    Uses mongo.exe to connect to a running MongoDB server.

    C: \ MongoDB \ Bin> Mongo MongoDB shell version: 2.2.3 connection to: test

    // mongodb shell

  • MongoDB as a Windows service

    Add MongoDB as a Windows service so that MongoDB starts automatically after every system restart. Install as a Windows service using --install .

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

    A Windows service named "MongoDB" has been created.

    To start the MongoDB service:

     net start MongoDB 

    To stop the MongoDB service

     net stop MongoDB 

    To remove the MongoDB service

     C:\mongodb\bin>mongod --remove 

    Link Link Install Mongodb

+8
source
  • First you downloaded mongodb from here: https://www.mongodb.com/download-center?jmp=nav#community
  • unzip the folder in the directory C:\..\MongoDB
  • you open the command line (demarrer> Invite commande)
  • you go to your folder where bin is located and you write this on the command line: cd c:\..\mongodb\bin
  • then you need to specify the directory in which you want to put the data, you can create a folder named MongoData and type in the command line: Mongod --dbpath C:\..\MongoData
0
source

All Articles