Over a million developers have joined DZone.

Mongo Database Installation on Windows XP

· Database Zone

To stay on top of the changing nature of the data connectivity world and to help enterprises navigate these changes, download this whitepaper from Progress Data Direct that explores the results of the 2016 Data Connectivity Outlook survey.


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

 

Turn Data Into a Powerful Asset, Not an Obstacle with Democratize Your Data, a Progress Data Direct whitepaper that explains how to provide data access for your users anywhere, anytime and from any source.

Topics:

Published at DZone with permission of Eric Genesky. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

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

{{ parent.tldr }}

{{ parent.urlSource.name }}