$ brew install mongodb Warning: No developer tools installed. You should install the Command Line Tools. Run `xcode-select --install` to install them. ==> Installing mongodb dependency: scons ==> Downloading http://downloads.sourceforge.net/scons/scons-2.3.0.tar.gz ######################################################################## 100.0% ==> /usr/bin/python setup.py install --prefix=/usr/local/Cellar/scons/2.3.0 --st 🍺 /usr/local/Cellar/scons/2.3.0: 395 files, 4.2M, built in 10 seconds ==> Installing mongodb ==> Downloading http://downloads.mongodb.org/src/mongodb-src-r2.4.8.tar.gz ######################################################################## 100.0% ==> Downloading patches ######################################################################## 100.0% ==> Patching patching file src/third_party/v8/SConscript ==> scons install --prefix=/usr/local/Cellar/mongodb/2.4.8 -j4 --64 --cc=/usr/bi ==> 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 ==> Summary 🍺 /usr/local/Cellar/mongodb/2.4.8: 18 files, 271M, built in 10.3 minutes
そうしたら、こんなエラーが出てもうた、、、
$ mongo MongoDB shell version: 2.4.8 connecting to: test Tue Nov 5 21:04:14.625 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect failed
で、この辺を見てみた。
$ mongod --repair $ sudo mongod
そしたら、なんか使えるようになったっぽいが、warningが、、、(汗)
$ mongo MongoDB shell version: 2.4.8 connecting to: test Server has startup warnings: Tue Nov 5 21:18:00.144 [initandlisten] Tue Nov 5 21:18:00.144 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
こういう時、英語で探すとたくさんhelpが出てくるとこまではいいけど、どこまで信じていいものやら。。
何か分かったら、次回(あるのか?)書きます。
0 件のコメント:
コメントを投稿