信仰

猛图www.omeng.org

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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中应用 大家可以 看下官网的文档 有中文的咯
posted on 2010-04-10 20:42  信仰123  阅读(1968)  评论(0)    收藏  举报

猛图