Skip to content

Instantly share code, notes, and snippets.

@liwh
Created December 2, 2010 15:07
Show Gist options
  • Save liwh/725492 to your computer and use it in GitHub Desktop.
Save liwh/725492 to your computer and use it in GitHub Desktop.
install mongodb

ApplematoMacBook-Pro:~ Apple$ sudo brew install mongodb
Warning: It appears you have MacPorts or Fink installed.
Software installed with MacPorts and Fink are known to cause problems.
If you experience issues try uninstalling these tools.
==> Downloading http://fastdl.mongodb.org/osx/mongodb-osx-x86_64-1.6.4.tgz

  1. 100.0%
    ==> Caveats
    If this is your first install, automatically load on login with:
    cp /usr/local/Cellar/mongodb/1.6.4-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/1.6.4-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/1.6.4-x86_64/mongod.conf
==> Summary
/usr/local/Cellar/mongodb/1.6.4-x86_64: 16 files, 83M, built in 2 seconds

ApplematoMacBook-Pro:~ Apple$ sudo cp /Library/LaunchAgents/org.mongodb.mongod.plist /Library/LaunchDaemons/
Password:
ApplematoMacBook-Pro:~ Apple$ launchctl unload -w /Library/LaunchAgents/org.mongodb.mongod.plist
ApplematoMacBook-Pro:
Apple$ sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist

详细步骤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment