Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
share|improve this question
    
Is there anything preventing you from configuring MongoDB exactly the same way as described in the linked article? –  patrix Jun 13 '12 at 19:16
add comment

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer
    
thank you very much this is exactly what i'm looking for. –  x00xer Jun 28 '12 at 14:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.