进入到/usr/local
cd /usr/local
mkdir mymongodb
cd mymongodb
下载mongoDB压缩包
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.4.tgz
tar -zxvf mongodb-linux-x86_64-2.0.4.tgz
建立软连接,需要全路径
ln -s /usr/local/mymongodb/mongodb-linux-x86_64-2.0.4 /usr/local/mymongodb/mongodb
mkdir -p /usr/local/mymongodb/mongodb/data/db
mkdir -p /usr/local/mymongodb/mongodb/log
cd mongodb
bin/mongod -port 10000 -fork -logpath /usr/local/aimongo/mongodb/log/mongo_db.log --logappend --dbpath /usr/local/aimongo/mongodb/data/db
ps -ef|grep mongodb
netstat -lanp | grep "10000"