✘ ~ brew install mongodb
Updating Homebrew…
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
certigo
==> Downloading https://homebrew.bintray.com/bottles/mongodb-3.4.2.sierra.bottle.1.tar.gz
Already downloaded: /Users/pengting/Library/Caches/Homebrew/mongodb-3.4.2.sierra.bottle.1.tar.gz
==> Pouring mongodb-3.4.2.sierra.bottle.1.tar.gz
==> Caveats
To have launchd start mongodb now and restart at login:
brew services start mongodb
Or, if you don’t want/need a background service you can just run:
mongod –config /usr/local/etc/mongod.conf
==> Summary
? /usr/local/Cellar/mongodb/3.4.2:
需要导入的变量
export PATH=/usr/local/Cellar/mongodb/3.4.2/bin:${PATH}