Wednesday, 13 August 2014

Getting Started with MongoDB - The Beginners Tutorial

 In this article, I'll be explaining the basics to start with mongoDB.
  1. What is mongoDB ?
  2. Installation of mongoDB in Windows 2008 64 bit OS.
  3. Start the mongoDB Server ?
  4. What is the client Tool for mongDB Server ?
 1. What is mongoDB ?

  • MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling.
  • MongoDB works on concept of collection and document.
  •  More information : 1) http://docs.mongodb.org/manual/core/introduction/ 
  • It is a Big Data Technology. i.e., noSQL database. 

2. Installation of mongoDB in Windows 2008 64 bit OS ?
  •  Click on Download, by default, you will get msi file.
  • Once the download completes double click on the .exe file to get finish the installation.
  • Installation will go under below folder : C:\Program Files\MongoDB 2.6 Standard.
  • NOTE : I have not explained log file set up in this article.
3. Start the mongoDB Server ?
  • There are couple of ways(setting up windows services) to start the mongoDB Server in windows. Here I have described a simple way of starting the server from command line.
  • It's always best practice to start the server(any server) from command line(Why? logs we can see on the command line console). 
  • You need to run the mongod.exe file from command prompt opened with Admin privileges.
  • MongoDB requires a data folder to store its files.
  • The default location for the MongoDB data directory is c:\data\db. 
  • You can also create data directory any where in your hard drive : for example it could be D:\data\db
  • NOTE : This folder we have to create explicitly. (Either using New Folder GUI in windows or use command prompt)
  • Use the below command to Start the mongoDB server. 
  • C:\Program Files\MongoDB 2.6 Standard\bin>mongod.exe --dbpath D:\data\db
  • NOTE :

No comments:

Post a Comment