The easiest way to get started with CouchDB on Mac OS X is by downloading CouchDBX. This unofficial application doesn’t install anything to your system and can be run with a single double-click. Note, however, that for more serious use, it is recommended that you do a traditional installation with something like Homebrew.
Homebrew is a recent addition to the software management tools on Mac OS X. Its premise is zero configuration, heavy optimizations, and a beer theme. Get Homebrew from http://github.com/mxcl/homebrew. The installation instructions are minimal. Once you are set up, run:
brew install couchdb
in the Terminal and wait until it is done. To start CouchDB, simply run:
couchdb
to see all the startup options available to you, run:
couchdb -h
This tells you how to run CouchDB in the background, among other useful hints.
To verify that CouchDB is indeed running, open your browser and visit http://127.0.0.1:5984/_utils/index.html.
MacPorts is the de facto package management tool for Mac OS X. While not an official part of the operating system, it can be used to simplify the process of installing FLOSS software on your machine. Before you can install CouchDB with MacPorts, you need to download and install MacPorts.
Make sure your MacPorts installation is up-to-date by running:
sudo port selfupdate
You can install CouchDB with MacPorts by running:
sudo port install couchdb
This command will install all of the necessary dependencies for CouchDB. If a dependency was already installed, MacPorts will not take care of upgrading the dependency to the newest version. To make sure that all of the dependencies are up-to-date, you should also run:
sudo port upgrade couchdb
Mac OS X has a service management framework called launchd
that can be used to start, stop, or manage system daemons. You can use this to start CouchDB automatically when the system boots up. If you want to add CouchDB to your launchd
configuration, you should run:
sudo launchctl load -w /opt/local/Library/LaunchDaemons/org.apache.couchdb.plist
After running this command, CouchDB should be available at:
http://127.0.0.1:5984/_utils/index.html
CouchDB will also be started and stopped along with the operating system.