mongodb的helloworld
1.数据默认保存在mkdir-p/data/db
2.下载curl-Ohttp://downloads.mongodb.org/linux/mongodb-linux-i686-latest.tgz
目前用的是mongodb-linux-i686-2011-07-08,
3./opt/mongodb/bin/mongodrun&
或/mongod--fork--dbpath/opt/mongo_data/--logpath/var/log/mongodb.log--logappend--rest
4./opt/mongodb/bin/mongo
db.<tab>有自动提示
[root@localhost ~]# /opt/mongodb/bin/mongo MongoDB shell version: 1.9.1-pre- connecting to: test > db.haoning.save({ningge:123}) > db.haoning.findOne() { "_id" : ObjectId("4e2278923fa3d8da7dd8721c"), "ningge" : 123 } >
转http://blog.csdn.net/lolinzhang/article/details/4353699
源码分析http://www.cnblogs.com/daizhj/archive/2011/03/17/1987311.html