Installing CouchDB on Mac OS X Leopard


I had installed CouchDB using Mac Ports but looks like ports installs an old and bugged version of CouchDb. So I decided to uninstall the couchdb and install it straight from source.

Here we go. Open your terminal and follow the instructions.

Installing CouchDB dependencies

First step is to install the ICU (International Components for Unicode). Execute the following commands:

$ curl -O
$ tar xvf icu4c-4_2_1-src.tgz
$ cd icu/source
$ ./configure --prefix=/usr/local
$ make
$ make install
$ cd ~

Now, we need to install another dependency, the SpiderMonkey, which is a Mozilla Foundation Javascript engine.

$ curl -O
$ tar xvf js-1.7.0.tar.gz
$ cd js/src
$ make BUILD_OPT=1 -f Makefile.ref
$ sudo mkdir -p /usr/include/smjs
$ sudo cp *.(h,tbl} /usr/include/smjs/
$ cd Darwin_OPT.OBJ
$ sudo cp *.h /usr/include/smjs/
$ sudo cp js /usr/local/bin/
$ sudo cp libjs.dylib /usr/local/lib/
$ cd ~

CouchDB is developed in Erlang, so we also need to install Erlang

$ curl -O
$ tar xzf otp_src_R13B01.tar.gz
$ cd otp_src_R13B01
$ ./configure --prefix=/usr/local \
  --enable-smp-support --enable-hipe --enable-darwin-universal \
$ make
$ make install
$ cd ~

Installing CouchDB

$ svn co couchdb
$ cd couchdb
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ~

After the compiling and installing, you can check the couchdb version

$ couchdb -V

To start the couchdb:

$ sudo couchdb -b

Now, you can open your browser and access the couchdb:

To stop couchdb:

$ sudo couchdb -d

That’s all folks


2 comments so far

  1. Jan on


    thanks for the write up. Most recent install instructions are always in the CouchDB (capital B) README file.

    I’d advise to use instead of localhost because that’ll still work if ipv6 is enabled (which is the default)


    • Leonardo on

      Thanks Jan! I’ve update the post to use instead of localhost! 😀

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: