安装Mongodb
使用Homebrew进行安装
-
- brew update
- brew install mongodb
在登录时自动启动
-
- cp /usr/local/Cellar/mongodb/2.4.3-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
-
- すぐ起動する
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
处理警告
-
- 対応: WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
echo ‘limit maxfiles 10000 unlimited’ | sudo tee -a /etc/launchd.conf
sudo chmod 775 /etc/launchd.conf