美文网首页
mongodb手动安装

mongodb手动安装

作者: tianmh | 来源:发表于2016-04-12 16:08 被阅读70次

    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

    相关文章

      网友评论

          本文标题:mongodb手动安装

          本文链接:https://www.haomeiwen.com/subject/tlhwlttx.html