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. Homebrew will be used to install the other required packages.
/usr/bin/ruby -e "$( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install the following packages using Homebrew:
brew install autoconf automake bash ccache cmake \ coreutils flex gnu-tar icu4c libtool \ maven ninja pkg-config pstree wget \ zlib python
An older version of
bison is required to correctly compile the code. The following command installs the required
3.4.1 version of bison.
brew install \ https://raw.githubusercontent.com/Homebrew/homebrew-core/ee89a1d59df03f495a85c15e253b60299082ab9d/Formula/bison.rb
NoteYugabyteDB build scripts rely on Bash 4. Make sure that
/usr/local/bin/bashbefore proceeding. You may need to put
/usr/local/binas the first directory on
~/.bashrcto achieve that.
Build the code
Assuming this repository is checked out in
~/code/yugabyte-db, run the following:
cd ~/code/yugabyte-db ./yb_build.sh release
The command above builds the release configuration, puts the C++ binaries in
build/release-clang-dynamic-ninja, and creates the
build/latest symlink to that directory.
TipYou can find the binaries you just built in
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:
- JDK 8
- Apache Maven .
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
For building YugabyteDB Java code, you'll need to install Java and Apache Maven.