2012-01-02 16:42:19 0 评论 Mac os X Boy.Lee

Mac系统设置MongoDB手动或自动启动

{If this is your first install, automatically load on login with:}

mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mongodb/2.0.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

{If this is an upgrade and you already have the org.mongodb.mongod.plist loaded:}

launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
cp /usr/local/Cellar/mongodb/2.0.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

{Or start it manually:}

mongod run --config /usr/local/Cellar/mongodb/2.0.2-x86_64/mongod.conf