1.下载

      mongodb-linux-i686-2.2.1-rc1.zip 

2.

unzip mongodb-linux-i686-2.2.1-rc1.zip 

3.

mkdir /data

  

mkdir /data/db

4.

运行解压目录下到mongo

$ ./bin/mongo

若出错:

MongoDB shell version: 2.2.1-rc1
connecting to: test
Wed Dec  3 22:03:43 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed

  

# ./bin/mongod -dbpath=/data/db

另开控制台,再次运行4