Friday, March 19, 2010

Installation of CouchDB on RHEL 5

My system configuration

OS : Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel: 2.6.18-128.el5
Hardware: SUN x4200 (AMD Dual-Core AMD Opteron(tm) Processor 2220)

Building Couch from Source Code
  1. Download and install pre-requisites software:

  • libicu-3.6-5.11.1
  • libicu-devel-3.6-5.11.1.x86_64
  • openssl-0.9.8e-7.el5
  • openssl-devel-0.9.8e-7.el5
  • curl-7.15.5-2.el5
  • curl-devel-7.15.5-2.el5
  • automake-1.9.6-2.1
  • autoconf-2.59-12
  • libtool-1.5.22-6.1
  • gcc-4.1.2-44.el5
  • erlang-R12B-5.6.el5.1.x86_64
  • js-devel-1.60-1.el5.rf.x86_64
  • js-1.60-1.el5.rf.x86_64

   2. Download the CouchDB source code
  • apache-couchdb-0.10.1.tar.gz

   3. Untar the couchdb archive

   4. Compile the source code
  • ./configure –with-erlang=/usr/lib64/erlang/usr/include
  • make
  • make install
   5. Modify config file to suit your environment
  • Edit /usr/local/etc/couchdb/local.ini and change the port and bind_address value.
   6. Create couchdb administrator
  •  adduser -r --home /usr/local/var/lib/couchdb -M --shell /bin/bash --comment "CouchDB Administrator" couchdb
   7. Change the ownership of the Apache CouchDB directories:
  • chown -R couchdb:couchdb /usr/local/etc/couchdb
  • chown -R couchdb:couchdb /usr/local/var/lib/couchdb
  • chown -R couchdb:couchdb /usr/local/var/log/couchdb
  • chown -R couchdb:couchdb /usr/local/var/run/couchdb
   8. Change the permission of the Apache CouchDB directories:
  • chmod -R 0770 /usr/local/etc/couchdb
  • chmod -R 0770 /usr/local/var/lib/couchdb
  • chmod -R 0770 /usr/local/var/log/couchdb
  • chmod -R 0770 /usr/local/var/run/couchdb
   9. Setup couchdb to startup automatically after reboot
  • ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
  • chkconfig --add couchdb
  • chkconfig --level 345 couchdb on
 10. Start couchdb
  • /sbin/service couchdb start
 11. Launch browser and go to the http://bind_address:port_number. Use the values as per step 5.

No comments:

Post a Comment