2.下载curl -O http://downloads.mongodb.org/linux/mongodb-linux-i686-latest.tgz
目前用的是mongodb-linux-i686-2011-07-08,
3./opt/mongodb/bin/mongod run &
或/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