Tuesday, May 6, 2014

2 Install Mongo DB on Windows

Install Mongo DB on windows is easy . 4 steps and you are in business.

  • Download the software.
  • Unzip the software
  • Create the data folder
  • run the daemon mongod.exe .

image

Simply control + C would shutdown the mongo DB gracefully.


RUN mongo DB as windows service

Create the configuration file:
dbpath=D:\mongoDB\data\mongo1
logpath=D:\mongoDB\DBAREPORT\mongo1-server.log
logappend=true
verbose=vvvvv
directoryperdb=true
journal=true
bind_ip=127.0.0.1
port=27017
serviceDescription=mongo1
serviceDisplayName=mongo1
serviceName=mongo1
  • options are case sensitive . The best way to find the options are check the mongod –help
  • quote on the path does not work. EX: can not use “C:\data\db”

Use below command to install as service .

mongod.exe --install --config D:\mongoDB\DBACONFIG\mongodb1.conf

image

Then we can find mongo db list in the service manager.

image

 

Errors

Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it. 

This is because the you are running on the non-privilege session. change to the administrator command line would resolve this. 

 

 

Reference

http://docs.mongodb.org/manual/reference/configuration-options/

2 comments:

  1. You really saved my "mongdob" program life.
    I so appreciate your resolution, because "erro 10061" stucked me for a couple of days.
    Thanks a lot!!!!!!!!!!!!!!!!!!

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates