NoSQL Zone is brought to you in partnership with:

Eric is the Editorial Manager at DZone, Inc. Feel free to contact him at egenesky@dzone.com Eric has posted 804 posts at DZone. You can read more from them at their website. View Full User Profile

Mongo Database Installation on Windows XP

02.08.2013
| 2719 views |
  • submit to reddit

  • Mongo Database is a document oriented database.It is not like traditional Relational Database such as Oracle, MySql, Sybase .
  • Mongo Database has implemented the JSON(JavaScript Object Notation) concept .
  • Mongo database has 64 bit and 32 bit installation.Though after 2.0.6 it does not support 32 bit machine.
  • Here we will see how to install Mongo in a windows xp machine.
  • Mongo database download link :-
            http://www.mongodb.org/downloads

Installation Steps :-

  1. Download the mongo database and save it in a directory.It named as mongodb-win32-i386-2.0.6.
  2. Open the Command prompt (cmd) and  change the directory to mongodb-win32-i386-2.0.6  and follow the below steps shown in screenshot :-


In above Screenshot,
  • F:\mymongodb folder is created , Here the the mongodb will be installed as data base .
  • Change the current directory to the bin folder.
  • Then run mongod.exe file with - -dbpath option. This option points the path for mongo db installation.
3. After executing the above command a pop cmd will open and configure the mongo with host and port automatically. The screenshot ,

4. If Firewall in machine is on, then a popup will come for unblocking it. Press unblock to unblock the mongo.

Verify Mongo Database Installation:-

  • Check the Task Manger if  mongod.exe is running or not ,
           
  • Check the localhost with port 28017 in a browser for mongo installation ,

Installing Mongo DB as a Window Service :-

  • Mongo database can be installed as service .The benefit of creating this service is to easily start and stop as regular window service,
           
  - -logpath option is for logging all the logs from a mongodb session.
  - -install  option to list this service as window's service.
  - -serviceName  option to name this service as user defined. Here we named it MyMongoService.

Verify the Service is Installed:-

  • Run the msconfig command and see the mongo service listing or open window service from control panel,

    Control Panel > Administrative Tools >Services ,

       
  •  The Log file mymongolog.txt contains,
            Creating service MyMongoService.
  Service creation successful.
  Service can be started from the command line via 'net start "MyMongoService"'.
  Sun Dec 23 21:10:46 dbexit:
  Sun Dec 23 21:10:46 shutdown: going to close listening sockets...
  Sun Dec 23 21:10:46 shutdown: going to flush diaglog...
  Sun Dec 23 21:10:46 shutdown: going to close sockets...
  Sun Dec 23 21:10:46 shutdown: waiting for fs preallocator...
  Sun Dec 23 21:10:46 shutdown: closing all files...
  Sun Dec 23 21:10:46 closeAllFiles() finished
  Sun Dec 23 21:10:46 dbexit: really exiting now

  • It Shows that in log file that we can run MyMongoService by net command.
          net start "MyMongoService"

  This some times gives an error like sytstem error 2 has occurred . This was fixed in later version though.

 

Published at DZone with permission of its author, Eric Genesky. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)