LoginSignup
76
75

More than 5 years have passed since last update.

Macにhomebrewを使ってmongodbをインストール

Posted at

homebrewはインストールしておき、brew が通るようにしておいて下さい。

brew install mongodb

==> Downloading
https://downloads.sf.net/project/machomebrew/Bottles/mongodb-2.6.1.mavericks.bottle.tar.gz

################################################################## 100.0%

==> Pouring mongodb-2.6.1.mavericks.bottle.tar.gz
==> Caveats
To have launchd start mongodb at login:
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
Then to load mongodb now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
Or, if you don't want/need launchctl, you can just run:
mongod --config /usr/local/etc/mongod.conf
==> Summary
? /usr/local/Cellar/mongodb/2.6.1: 17 files, 317M

  • ログイン時に起動しておきたい場合

ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

  • mongodb 起動

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

  • launchctlを使わずに 起動

mongod --config /usr/local/etc/mongod.conf

  • 起動確認用接続

mongo

MongoDB shell version: 2.6.1
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user

76
75
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
76
75