Point-and-Click Install of MongoDB on OS X 10.5+
Update: v1.4.4 is now available! See download links below.
Our skunk-works project at CollegeJobConnect uses MongoDB extensively for persistence. (Through the excellent Mongoid ODM.) MongoDB is fantastic, but setup on my MacBook Pro is still a manual process with each new version, so I've packaged up a simple installer that should get you up and running in no time.
The Old Way
- Download the MongoDB binary distribution from the matrix at MongoDB.org
- Move to /usr/local
- Symlink mongodb-osx-x86_64-1.4.4 -> mongodb
- Create a .plist file in /Library/LaunchDaemons
- Load the .plist file into launchd using launchctl
- Create data and log directories in /var
- Add Mongo to the path (/etc/paths.d/mongodb)
The New Way
- Download the MongoDB installer from Github (click here)
- Run the installer
You can check to see if it’s working properly by visiting http://localhost:28017/ after installation has completed.
The installer uses launchd and the x86_64 release of MongoDB v.1.4.4. It requires:
- Mac OS X 10.5 (Leopard) or 10.6 (Snow Leopard)
- A 64-bit CPU (Core 2 Duo or newer)
Steps to get it working on 10.4 (Tiger) are probably minimal but are left as an exercise for the reader. I don't use Tiger anymore... YMMV.
Feel free to leave feedback in the comments. Issues should be lodged at Github.
The installer is provided as a community service to people like me who are looking for an easier way to install MongoDB and keep it up to date. It comes with no warranty. I am not responsible for any damage caused by the installer. The project is freely available on Github. Feel free to peruse the source if you like.