{ MongoDb } with Windows 7 + Java


Before using MongoDB, you must install MongoDB driver for your operations systems. Such as,
Windows 32-bit (install) Windows 64-bit(install)

You save installed files into "c:\mongodb" then run this command in cmd.
(Note: You must create logs and data directory into c:\mongodb)

C:\mongodb\bin>mongod --bind_ip 127.0.0.1 --logpath c:\mongodb\logs --dbpath c:\mongodb\data --directoryperdb  -port 1001 --install
 
Also, to start MongoDB you should run "net start MongoDB" in cmd.

So, you look at the services, 

If you will be success, you should open the http://127.0.0.1:1001/ webpage for looking database database structure.
(Note: if you want to remove the service, you should write into cmd "mongod -remove")
Sample java application (install)

No comments: