[root@localhost soft]# tar -zxvf mongodb-linux-i686-2.0.2-rc2.tgz
mongodb-linux-i686-2.0.2-rc2/
mongodb-linux-i686-2.0.2-rc2/THIRD-PARTY-NOTICES
mongodb-linux-i686-2.0.2-rc2/GNU-AGPL-3.0
mongodb-linux-i686-2.0.2-rc2/README
mongodb-linux-i686-2.0.2-rc2/bin/
mongodb-linux-i686-2.0.2-rc2/bin/mongofiles
mongodb-linux-i686-2.0.2-rc2/bin/mongostat
mongodb-linux-i686-2.0.2-rc2/bin/bsondump
mongodb-linux-i686-2.0.2-rc2/bin/mongos
mongodb-linux-i686-2.0.2-rc2/bin/mongotop
mongodb-linux-i686-2.0.2-rc2/bin/mongodump
mongodb-linux-i686-2.0.2-rc2/bin/mongoimport
mongodb-linux-i686-2.0.2-rc2/bin/mongosniff
mongodb-linux-i686-2.0.2-rc2/bin/mongo
mongodb-linux-i686-2.0.2-rc2/bin/mongod
mongodb-linux-i686-2.0.2-rc2/bin/mongoexport
mongodb-linux-i686-2.0.2-rc2/bin/mongorestore
[root@localhost mongodb]# mkdir log
[root@localhost mongodb]# mkdir data
[root@localhost mongodb]# cd log
[root@localhost log]# touch mongodb.log
[root@localhost local]# cd mongodb/bin
[root@localhost mongodb]# ./bin/mongod -port 10001 --dbpath data/ --logpath log/mongodb.log
all output going to: log/mongodb.log
[root@localhost /]# cd usr/local/mongodb
[root@localhost mongodb]# ./bin/mongo localhost:10001
MongoDB shell version: 2.0.2-rc2
connecting to: localhost:10001/test
>
bye
connecting to: localhost:10001/test
> db.foo.save({a:1})
> db.foo.find()
{ "_id" : ObjectId("4ee66eb440ef7803a9873d2d"), "a" : 1 }
>
[root@localhost mongodb]# vi mongodb.conf
port=10001
dbpath=data/
logpath=log/mongodb.log
logappend=true
[root@localhost mongodb]# ./bin/mongod -f mongodb.conf
all output going to: log/mongodb.log