Archive for the ‘couchdb’ Tag

Installing CouchDB on Mac OS X Leopard

Howdy!

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 http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
$ 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 ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ 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 http://www.erlang.org/download/otp_src_R13B01.tar.gz
$ tar xzf otp_src_R13B01.tar.gz
$ cd otp_src_R13B01
$ ./configure --prefix=/usr/local \
  --enable-smp-support --enable-hipe --enable-darwin-universal \
  --enable-threads
$ make
$ make install
$ cd ~

Installing CouchDB

$ svn co http://svn.apache.org/repos/asf/couchdb/trunk 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:

http://127.0.0.1:5984/_utils

To stop couchdb:

$ sudo couchdb -d

That’s all folks

Advertisements