1. mongodb安装 先下载mongodb,官网地址; http://www.mongodb.org/downloads curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz 解压缩 tar -zxvf mongodb-linux-x86_64-2.6.1.tgz 新建目录 mkdir -p mongodbcp -R -n mongodb-li
curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz
tar -zxvf mongodb-linux-x86_64-2.6.1.tgz
mkdir -p mongodb cp -R -n mongodb-linux-x86_64-2.6.1/ mongodb
cd mongodb ./bin/mongod --help
mkdir data ./bin/mongod --port 9000 --fork --logpath /home/mongodb/log/mongodb.log --dbpath /home/mongodb/data/
mkdir config vim config/mongodb.conf
# mongodb config file port = 9000 fork = true logpath = /home/mongodb/log/mongodb.log dbpath = /home/mongodb/data/
./bin/mongod --config /home/mongdb/conf/mongodb.conf
./bin/mongo --port 9000 use admin db.shutdownServer();