LoginSignup
22
22

More than 5 years have passed since last update.

mongodbインストール(mac編)

Last updated at Posted at 2014-10-28

websocket入門を見ていたら、mongodbを使えと言われたので
mongodbをmacにインストールします。

これを参考にしました。
http://nigohiroki.hatenablog.com/entry/2013/01/05/234631

brew install mongodb

すると最後に


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

と出てくるので、指示通りに

ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

を実行する。


mongo

でmongoにアクセス出来る。

んで、今回の主目的はwebsocketってことで
PC間の通信がしたいので、IPアドレスをデフォルトから変更します。
設定ファイルは
/usr/local/etc/mongod.conf
bind_ip = ローカルip
に設定します

終わり。

22
22
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
22
22