1, download MongoDB, without compiling (if HTTPS does not, can be replaced by HTTP)
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz
TAR-ZXVF mongodb-linux-x86_64-2.6.1.tgz
MV mongodb-linux-x86_64-2.6.1 mongodb2.6.1//Simplified directory name
2, the establishment of data, log file directory
Cd/yourrootdocument
mkdir Mongodb_data
mkdir Mongodb_logs
3. Running MongoDB:
CD Mongodb2.6.1/bin
./mongod--dbpath=/mongodbdata/mongodb_db--logpath=/mongodbdata/mongodb_logs/mongodb.log--logappend&
4, check whether the port is started, the default port is: 27017
NETSTAT-LANP | grep 27017
5. Local Client Testing
CD Mongodb2.6.1/bin
./mongo
Output
MongoDB Shell version:2.6.1
Connecting To:test
Welcome to the MongoDB shell.
For interactive help, type ' help '.
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the Support group
Http://groups.google.com/group/mongodb-user
OK, you are done!