Couchbase Source

Building from source is easiest from the distribution tarball and is recommended for those looking to build on other OSs for which there are no binary releases. Building straight from the repositories and upstream source code projects is recommended if you are a developer who is enhancing Couchbase.

Prerequisites

Every Linux and other UNIX distributions have their own organization and default software packages that are included by default.

Ubuntu Ubuntu 11.04

The following packages are required, and can be installed using the command 'apt-get install <packagelist>'

make

gcc

g++

libcurl3-dev

libevent-dev

libicu-dev

erlang

Cent OS 5.4 (work in progress)

The following packages are required , and can be installed using the command "yum install <packagelist>'

memcachetest - a simple test utility for generating a large number of gets and sets

Building Membase

Assuming you are building from the consolidated source tarball, you will simply extract the tarball, cd into the directory and execute "make". If you have dependent components such as libcurl in different locations, you may need to edit the Makefile slightly to use the correct paths at buildtime. See the troubleshooting section below. As couchdb isn't required for the 1.8 or earlier builds, when running make disable it (removes the spidermonkey dependency as well.)

make DISABLE_COUCH=1

If instead you are building from individual components out of the source repository, you will need to generate the configure script and Makefile using autoconf and automake. In ns_server you will find a sample Makefile, "Makefile.all" which can assist with this.

Troubleshooting The Build

When building couchbase, the most frequent issues encountered involve not having the correct dependencies or not having them in the right path at the right time.

Things to check:

Is "erl" in your $PATH ?

Other Troubleshooting

Setting Special Locations
If you have libcurl in a different location, you may need to edit the source tarball Makefile to add the CFLAGS and LDFLAGS. For instance:

File Descriptor Settings
Couchbase starts a memcached process which allows up to 10,000 open connections. Therefore, it needs to be able to set it's number of open file descriptors to that amount. You will need to adjust the allowable number of file descriptors if you see this in the log:

Makefile Changes not Picked Up
If after a failed build you make a change to the Makefile but find it does not take effect, you may need to clean up the previous configuration used with that component. Do this by going to the component's directory and running "make dist clean"