How to install earlier version of mongodb with homebrew?

后端 未结 7 692
一整个雨季
一整个雨季 2020-12-22 20:07

I\'m on osx6.8 and need to install an earlier version of Mongodb, how do I install an earlier version with HomeBrew? The below didn\'t work :(

dream-2:app2         


        
相关标签:
7条回答
  • 2020-12-22 20:41

    If you want to install an earlier MongoDB version on mac. Go to the link https://docs.mongodb.com/v3.6/tutorial/install-mongodb-on-os-x/ and select the version which you want to install and its very easy to install, just give a try. There will be around 2-3 commands for installation.

    For example if you want to install version 3.6

    brew tap mongodb/brew
    brew install mongodb-community@3.6
    

    If you got some error

    If you need to have mongodb-community@3.6 first in your PATH run:
      echo 'export PATH="/usr/local/opt/mongodb-community@3.6/bin:$PATH"' >> ~/.bash_profile
    

    Then run

    export PATH="/usr/local/opt/mongodb-community@3.6/bin:$PATH"
    

    To confirm if it successfully installed:

    mongod -version
    
    0 讨论(0)
提交回复
热议问题