Mongod: Command Not Found (OS X)

前端 未结 9 992
情深已故
情深已故 2020-12-14 17:08

I am trying to test MongoDB and I have it all downloaded and moved into the root folder. I can navigate to the folder that holds the mongod, but when I try to run it by typi

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 17:38

    You need to add the name of the folder that contains the command mongod into your PATH so your shell knows where to find it.

    So, if mongod is in /usr/bin/freddyfrog, you would edit ~/.profile and find the line that says PATH= and edit it to look like this:

    export PATH=${PATH}:/usr/bin/freddyfrog
    

    Then login again to make it take effect.

提交回复
热议问题