0

I'm doing like here is described

http://hunterford.me/mongodb-startup-item/

but my file called different and path is here ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist. and mongo is starting well, but after system restart i have go through two last command again

sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist
sudo launchctl start org.mongo.mongod
  • Is there anything preventing you from configuring MongoDB exactly the same way as described in the linked article? – nohillside Jun 13 '12 at 19:16
0

If you have to use sudo to load it, the plist file may be owned by root. Launchd will only automatically load agents that you own from ~/Library/LaunchAgents, where it will load agents owned by root from /Library/LaunchAgents.

You can do ls -l ~/Library/LaunchAgents to view the ownership of the plist. If you actually want it to run under your user account, you can change it's ownership:

sudo chown `whoami` ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

However, if you need to run mongod as root, you should leave the plist in /Library/LaunchDaemons

  • thank you very much this is exactly what i'm looking for. – x00xer Jun 28 '12 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .