Install MongoDB on OS X (10.6 Snow Leopard)

Here are the steps:

  1. Download the pre-compiled binaries from:

  2. Create mongodb folder and unpack the files there
    sudo mkdir /usr/local/mongodb

  3. Create the configuration file
    sudo touch /usr/local/mongodb/mongod.conf
    and paste these lines in it:
    dbpath = /usr/local/mongodb
    logpath = /var/logs/mongodb/output.log
    bind_ip =
    # port = 27017
    # noauth = true

    More configurations options you can find here:

  4. Add “/usr/local/mongodb/bin” to your $PATH
    only for Leopard versions create a file “/etc/paths.d/mongodb” where you paste this path.

  5. Make mongodb starts when system starts
    touch /Library/LaunchDaemons/org.mongodb.mongod.plist
    and paste these lines in it:<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    <plist version="1.0">

    and then
    sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist

  6. See if it works (type in a terminal):

    $> mongo
    => MongoDB shell version: 1.2.4
    url: test
    connecting to: test

That’s it.