1:下载http://downloads.mongodb.org/win32/mongodb-win32-i386-1.4.0.zip
2:将一个DB文件夹 我是放到D盘,路径d:\db
3:D:\mongodb\bin\mongod.exe --dbpath=d:\DB ,mongodb-win32-i386-1.4.0.zip D:\mongodb\解压路,--dbpath=d:\DB 数据库的路径。
4:重新打开CMD输入:d:\mongodb\bin\mongo.exe,如果出现下面提示,恭喜你安装成功了,很简单吧
D:\mongodb\bin>d:\mongodb\bin\mongo.exe
MongoDB shell version: 1.4.0
url: test
connecting to: test
type "exit" to exit
type "help" for help
>
5:D:\mongodb\bin\mongod.exe -dbpath d:\DB -install 注册windows service,哈哈 免得以后麻烦,每回要启动
代码
D:\mongodb\bin>mongo.exe
MongoDB shell version: 1.4.0
url: test
connecting to: test
type "exit" to exit
type "help" for help
> use test
switched to db test
> db.foo.save({hello:1,word:2})
> db.foo.find()
{ "_id" : ObjectId("4bc1854e0140000000006f05"), "hello" : 1, "word" : 2 }
哈哈 完成 下次将如何在python中应用 大家可以 看下官网的文档 有中文的咯


浙公网安备 33010602011771号