Blogroll

Thursday, August 9, 2012

Install mongodb for windows

Follow some below step:
1. Download lasted version at http://www.mongodb.org/downloads and choose right version for your computer.
2. Extract zip file to somewhere, For me is c:\bin\mongodb.
3.Create folder that save mongodb data, For me is c:\data 
4.Open cmd and type cd c:\bin\mongodb\bin
5.Continue and cmd and type mongod --dbpath c:\data to run mongodb as services (c:\data is folder that created before).
In this step, mongdb is running, Remember don't close cmd because it's running.
To do testing with mongDb, do below step:
6. If have no error appear, It mean you installed mongodb  as services successful. Next test it working.
7.Open cmd and type  cd c:\bin\mongodb\bin and type another text is mongo and enter. Mongo shell will be apper.
8. Type code to insert to db db.test.save({a:'abc'}) , It mean add a with value is 'abc' to test collection
9.To show record in test collection , type code db.test.find()
Olá! Se você ainda não assinou, assine nosso RSS feed e receba nossas atualizações por email, ou siga nos no Twitter.
Nome: Email:

0 comments:

Post a Comment