Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 7, 2011

startup mongod when mac osx start

create new plist named: org.mongo.mongod.plist in /Library/LaunchDaemons/ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.mongo.mongod</string> <key>RunAtLoad</key> <true /> <key>ProgramArguments</key> <array> <string>/usr/local/bin/mongod</string> <string>--logpath</string> <string>/var/log/mongodb.log</string> </array> </dict> </plist> ensure that file mongodb.log already exist or you should create empty file ( touch /var/log/mongodb .log or vim /var/log/mongodb.lo g) chown root:wheel /Library/LaunchDaemons/org.mongo.mongod.plist launchctl load /Library/LaunchDaemons/org .mongo.mongod.plist la