Build the source code

NoteCentOS 7 is the recommended Linux distribution for development and production platform for YugabyteDB.

Install necessary packages

First, install Homebrew, if you do not already have it. We will use this to install the other required packages.

  1. /usr/bin/ruby -e "$(
  2. curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install the following packages using Homebrew:

  1. brew install autoconf automake bash bison ccache cmake \
  2. coreutils flex gnu-tar icu4c libtool maven \
  3. ninja pkg-config pstree wget zlib [email protected]

NoteYugabyteDB build scripts rely on Bash 4. Make sure that which bash outputs /usr/local/bin/bash before proceeding. You may need to put /usr/local/bin as the first directory on PATH in your ~/.bashrc to achieve that.

Building the code

Assuming this repository is checked out in ~/code/yugabyte-db, do the following:

  1. cd ~/code/yugabyte-db
  2. ./yb_build.sh release

The above command will build the release configuration, put the C++ binaries in build/release-gcc-dynamic-community, and will also create the build/latest symlink to that directory.

TipYou can find the binaries you just built in build/latest directory.

For Linux, it will first make sure our custom Linuxbrew distribution is installed into ~/.linuxbrew-yb-build/linuxbrew-<version>.

Build Java code

YugabyteDB core is written in C++, but the repository contains Java code needed to run sample applications. To build the Java part, you need:

Also make sure Maven’s bin directory is added to your PATH (for example, by adding to your ~/.bashrc). See the example below (if you’ve installed Maven into ~/tools/apache-maven-3.5.0)

  1. export PATH=$HOME/tools/apache-maven-3.5.0/bin:$PATH

For building YugabyteDB Java code, you’ll need to install Java and Apache Maven.