mongodb手动安装

step1:download:https://www.mongodb.org/downloads

step2:tar -zxvf mongodb-linux-x86_64-3.2.4.tgz

step3:mkdir -p mongodbcp -R -n mongodb-linux-x86_64-3.2.4/ mongodb

step4

#you can add the following line to your shell’s rc file (e.g. ~/.bashrc):

vim ~/.bashrc

# mongodb config

#export PATH=<mongodb-install-directory>/bin:$PATH

>export PATH=”/root/mongodb/mongodb-linux-x86_64-ubuntu1204-3.0.11/bin:$PATH”

step5

cd /root/mongodb/mongodb-linux-x86_64-ubuntu1204-3.0.11

mkdir data

mkdir log

step6

mongod –dbpath data –logpath log/mongod.log -logappend –fork

mongo

step7

echo “mongod –dbpath data –logpath log/mongod.log -logappend –fork”>>start.sh

    原文作者:tianmh
    原文地址: https://www.jianshu.com/p/27a0e6108b30
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞