Over a million developers have joined DZone.

Mongo Database Installation on Windows XP

DZone's Guide to

Mongo Database Installation on Windows XP

· Database Zone ·
Free Resource

Running out of memory? Learn how Redis Enterprise enables large dataset analysis with the highest throughput and lowest latency while reducing costs over 75%! 

  • 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 :-

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.


Running out of memory? Never run out of memory with Redis Enterprise databaseStart your free trial today.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}