LoginSignup
0
0

More than 5 years have passed since last update.

[macOS]MongoDBのインストールからコンソールに入るまで

Posted at

MongoDBのインストール方法

%brew install mongodb
で安定版4.0.4がインストールされる

起動方法

今すぐ起動して、ログイン時に自動で再起動する場合
%brew services start mongodb

Successfully started ‘mongodb’ (label: homebrew.mxcl.mongodb)
と出たら起動成功

%mongo

でmongodbのインターフェースに入る

バックグラウンドで起動しない起動方法

バックグラウンドで起動したくない場合は
%mongod --config /usr/local/etc/mongod.conf
を入力するとターミナルがサーバを起動した状態になるので、command+tで新しい
ターミナルのタブを開いて,
%mongo
と入力すれば、MongoDBのコンソールに入れる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0