How to install and configure MongoDB in Windows

How to install and configure MongoDB in Windows

""MongoDB is an open-source document database that provides high performance, high availability, and automatic scaling. MongoDB obviates the need for an Object Relational Mapping (ORM) to facilitate development.""


-Download the .msi installer from the MongoDB site-Download MongoDB

-Go to the main folder (which contain "bin" folder)

-Create two folders
      1.Data
      2.Log
-Inside the Log folder create a log file(eg: mongolog.log)
-Now come back to the main folder and create a config file , say 'mongo.config'
-Now open the config file and enter details as below-


   systemLog:
    destination: file
    path:
   storage:
    dbPath:










-Now open cmd and navigate to the mainfolder
->Then ' cd bin'
->mongod.exe --config="path of the config file"

Please refer the picture below-

Now Mongo server is up and running.To test it , open a new cmd and enter details as below-



If you get test as result, then the mongodb is working.The 'test' is the default database .You can also try the below code for checking-




Comments

Popular posts from this blog

How To Install LEX and YACC in Linux or Ubuntu

Lex Program To Check The Syntax of For Loop

Listing/Delisting of an article in to an Assortment in SAP SCM Retail