Installing couchdb on RHEL4

1. Install erlang

Ignore the instructions here which are misleading and outdated.

cd ~/src
mkdir erlang
cd erlang
wget http://www.erlang.org/download/otp_src_R11B-5.tar.gz
tar xzvf otp_src_R11B-5.tar.gz
cd otp_src_R11B-5
./configure && make && sudo make install
## ignore warnings about jinterface and odbc

2. Solve dependencies. You’ll need EPEL

yum install icu libicu-devel

3. install couchdb

cd ~/src
svn checkout http://couchdb.googlecode.com/svn/trunk/ couchdb
cd couchdb
./bootstrap && ./configure && make && sudo make install

You may need to change one line in configure.ac: You don’t need to do this in latest builds (last tested 0.73a)

38
39
--FLAGS="-I${ERLANG_HEADERS_DIRECTORY} -I/opt/local/lib/erlang/usr/include/"
++FLAGS="-I${ERLANG_HEADERS_DIRECTORY} -I/usr/local/lib/erlang/usr/include/"

or if you don’t want to do that, this nasty hack will paper over the problem: (unnecessary in recent builds)

ln -s /usr/local /opt/local

4. start couchdb

sudo couchdb
couch 0.7.0a548 (LogLevel=info)
CouchDB is starting.
CouchDB has started. Time to relax.

UPDATED to cover recent builds.

Tags: ,

5 Responses to “Installing couchdb on RHEL4”

  1. Darren Says:

    Thanks for the post. FYI I had to yum install libicu-devel, not icu-devel.

  2. Sho Says:

    Darren, thanks, I think you are actually right - I had tried icu-devel first but libicu-devel was correct - just copied the wrong lines from .bash_history!

    I’ve corrected my error, thanks again.

  3. tommy Says:

    You will also need spidermonkey. I had to add RPM Forge to my repository and do a yum install js js-devel

  4. mike Says:

    How did you manage to install erlang on rhel 4 so easily? What were the pre-reqs? thx

  5. Sho Says:

    Dependencies for Erlang? Hm, none that I’m aware of? Make sure openssh and stuff like that is installed first, otherwise it just worked like that for me.

    However, to be perfectly honest, I would recommend upgrading to RHEL5 if you’re planning on running CouchDB. I never got it working properly on RHEL4. Now admittedly that could have just been my own incompetence, but I did try pretty hard so be warned.

Leave a Reply