Building Couchbase from Source

Thanks to @trondn it is easier than ever to build
couchbase from source. So I decided to take the new
build system for a spin on my Macbook based on the

Getting all the dependencies

First of all if you are not yet using homebrew already, start
doing so it will make your live a lot easier throughout the world of open source
tool chains. Ok let’s get started, by installing all the needed dependencies

Installing dependencies

Ok now let’s see what all this is

  • repo is a tool which ties together
    multiple git repositories so we can use them as one big project. It it also
    reponsible for the whole code review process when used in conjuction with
  • v8 is googles JavaScript engine, know for
    being amazingly fast. It is used in Couchbase server to execute JavaScript.
  • snappy is a compression library optimized
    for speed. This is used internally to compress the data written to disk.
  • icu4c unicode library to handle all
    the unicode needs.
  • google-perftools provides
    TCMalloc a faster
    malloc implementation which is used whereever malloc is needed.
  • erlang a programming language build for highly
    concurrent systems. In Couchbase this is used in multiple places but
    especially the cluster managing.
  • libevent event library used internally in couchbase.
  • cmake cross platform build system to make it easy to
    build on multiple platforms native build systems. Couchbase uses this now to
    generate the build files needed on either Windows / Mac and Linux.
  • git Version control system.

This covers the basics now it’s time to get the source and start building!

Getting the source Couchbase

As metioned before Couchbase relies on repo to manage all the interdepended
repositories. So to get the source in the right versions you need to get the
manifest for the version of Couchbase you want to build so repo can get all the
right source for you. This is easy enough, simply create a folder for the source
and setup repo in there in this case with the master branch.

Initializing the repository

And finally we get the source by telling repo to sync our local copy

Download the source

That’s it time to build

Building Couchbase

Building the software itself is now as simple as running make

Build with make

Afterwards couchbase should be ready to run

Running Couchbase server

and you can visit the webinterface for all your
configuration needs.

Couchbase web GUI

The End

And there you have it, that’s all you need todo to get your locally build
version of couchbase up and Running, to maybe tryout all the new features
currently in development.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.