— db — 1 min read
ググって出てきた日本語のページの内容では上手くいかず、公式のドキュメントに沿ってやってみたらできたのですが、現時点の日本語でのメモとして残しておきます。
まずはbrewにmongodbを追加します。
brew tap mongodb/brewそれからインストールします。
※公式では4.2となってましたが、途中まで打ってtabで補完したときに4.0までしか出なかったので4.0で進めます。
brew install mongodb-community@4.0次にPATHを通します。
echo 'export PATH="/usr/local/opt/mongodb-community@4.0/bin:$PATH"' >> ~/.bash_profilePATHを通したら起動してみます。
brew services start mongodb-community@4.0起動できたら
mongoこれでMongo Shellにも入れます。
ちなみに停止は
brew services stop mongodb-community@4.0アンインストールは
brew uninstall mongodb-community@4.0参考: Install MongoDB Community Edition on macOS | MongoDB Manual