Skip to main content

CouchDB on RHEL6 (Red Hat Enterprise Linux)

Had to install a Couch DB instance on a fresh Red Hat Enterprise 6 Linux Box and it required some time before I got the whole thing up. Better have it documented here for future reference:

1. Get the Prerequisites
First you will have to add the RPM Forge YUM Repository if not already available. Add the new repo:

sudo vi /etc/yum.repos.d/rpmforge.repo

# Name: RPMforge RPM Repository for Red Hat Enterprise 6 - dag
# URL:
# (Put "x86_64" instead of "i386" if appropriate.)
name = Red Hat Enterprise $releasever - - dag
baseurl =
enabled = 1
protect = 0
gpgcheck = 0

Save the file and get the prerequisites:

sudo yum clean all
sudo yum groupinstall 'Development Tools' 'Development Libraries' 'GNOME Software Development'
sudo yum install \
  cvs zip gcc-c++ glib2-devel gtk2-devel fontconfig-devel libnotify-devel \
  libIDL-devel alsa-lib-devel libXt-devel freetype-devel pkgconfig \
  dbus-glib-devel curl-devel autoconf213 xorg-x11-proto-devel libX11-devel \
  libXau-devel libXext-devel wireless-tools-devel glibc-static libstdc++-static \
  yasm mesa-libGL-devel esound-libs esound-devel ccache mercurial glibc-devel \
  ncurses-devel openssl-devel libicu-devel erlang js-devel libtool which make

If Mercurial is not found, you can install a RPM package from RPMForge using the below commands
(replace VERSION with your version/architecture):

sudo wget
sudo rpm -Uhv mercurial-VERSION.rpm

If curl was not found, install from sources

sudo wget
sudo tar -xzf curl-7.20.1.tar.gz
cd curl-7.20.1
sudo ./configure --prefix=/usr/local
sudo make
sudo make test
sudo make install

If Erlang was not found, download, build and install Erlang:
sudo wget
sudo tar zxvf otp_src_R14B03.tar.gz
sudo cd otp_src_R14B03
sudo ./configure && sudo make && sudo make install

If js-dev (SpiderMonkey) was not found, build from the source files
sudo mkdir mozilla
sudo cd mozilla
sudo wget
sudo tar xzf js185-1.0.0.tar.gz
cd js/src
sudo autoconf-2.13
sudo ./configure
sudo make
sudo make install

2. Install CouchDB
Now you are ready to install CouchDB from sources. The configure line below is for 64-bit, adjust for your arch (or leave out --with-erlang if configure can find out for itself). You can use a release tarball instead of a checkout, in that case skip right to the ./confgure line.

sudo svn checkout couchdb
cd couchdb
sudo ./bootstrap
sudo ./configure --with-erlang=/usr/lib64/erlang/usr/include --with-js-lib=/usr/local/lib/ --with-js-include=/usr/local/include/js/
sudo make
sudo make install

3. Configure CouchDB
a. Edit config file to your need, change the port etc
sudo vi /usr/local/etc/couchdb/local.ini

b. Create user, modify ownership and permissions
sudo groupadd -r couchdb
sudo adduser -r -d /usr/local/var/lib/couchdb -M \
  -s /bin/bash -g couchdb couchdb

c. fix permission
sudo chown -R couchdb: /usr/local/var/lib/couchdb /usr/local/var/log/couchdb

4. Launch CouchDB

sudo -u couchdb couchdb

Or as daemon:
sudo /usr/local/etc/rc.d/couchdb start

Or at startup as a daemon:
sudo ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
sudo chkconfig --add couchdb
sudo chkconfig --level 345 couchdb on

5. Test Install:

Now you should see something meaningful when you click 


  1. and installing on ubuntu 11.10 ... as simple as

    sudo apt-get install couchdb

  2. The base url listed above is not working. The rpmforge seems to have been moved to> But even after setting the rpmforge repo on my RHEL6.3 server, the groupinstall command isn't working. I'a stuck trying to install couchDB. Any alternatives?


Post a Comment

Popular posts from this blog

Using duplicate IDs in HTML

Well today I'm being a bit controversial. Let us see what the HTML5 spec says about unique IDs in a HTML file. The  id  attribute specifies its element's  unique identifier (ID) . The value must be unique amongst all the IDs in the element's  home subtree  and must contain at least one character. The value must not contain any  space characters . An element's  unique identifier  can be used for a variety of purposes, most notably as a way to link to specific parts of a document using fragment identifiers, as a way to target an element when scripting, and as a way to style a specific element from CSS. Yes its been mentioned almost everywhere on the planet that ID must be unique. Now let us look at the below code, Launch dup.css #p2 {   background-color: yellow;  } dup-id.html <!DOCTYPE html> <html>   <head>     <title>Duplicate ID Tester</title> <link rel="stylesheet" href="dup.css" />  

Minimal required code in HTML5

I've encountered this question repeatedly of late. "What are the tags required at bare minimum for a html file?" Earlier there were a bunch of mandatory tags that were required for any html file. At bare minimum, the recommended structure was: (ref: ) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" ""> <HTML>   <HEAD>     <TITLE>A small HTML</TITLE>   </HEAD>   <BODY>     <P>Small HTML file!</P>   </BODY> </HTML> Yes, using capitals for the tags was the way to go! Those were the days of the purists and strict was the way to be. Now open your notepad and copy the above code, save the file as old.html and launch it in Chrome or Firefox. You will see only one line "Small HTML file!" shown. Now launch the developer tools in Chrome or Inspect Element in Firefox. Thi

My Bookmarks fly to the Cloud

Updated: 15-Mar-2012 With latest version of Google Chrome (I'm using 17.x), you can now directly sign into Chrome from Options->Peronsal and access your bookmarks across computers. You no longer would need to export the bookmarks to Firefox using the Google Toolbar for Firefox, which is no longer supported by Google. The Google Toolbar is now available only for IE. Original (dated) article below ... ------- I have a queer problem of too many! I surf a lot, I subscribe to a lot and I bookmark a lot. Some numbers: 1 laptop and 1 netbook at home, 1 laptop and 1 desktop at office, sometimes its my Kindle and definitely my N900 when I'm on the move. So 6 devices out there and usually 2 browsers on most of them (yes Kindle only as one webkit based experimental implementation). So my bookmarks are all over the place, scattered over at least 10 different places. And each time I'm working on one box, I wish I had access to the bookmark I made a few hours ago on the other