Skip to content

Commit

Permalink
[docs] Re-add missing steps and edit content (#4209)
Browse files Browse the repository at this point in the history
* Re-add missing steps and edit content

* Change PATH to be consistent
  • Loading branch information
stevebang authored Apr 13, 2020
1 parent 8473bf4 commit c952ee3
Showing 1 changed file with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CentOS 7 is the recommended Linux distribution for development and production pl

## Install necessary packages

First, install [Homebrew](https://brew.sh/), if you do not already have it. We will use this to install the other required packages.
First, install [Homebrew](https://brew.sh/), if you do not already have it. Homebrew will be used to install the other required packages.

```sh
/usr/bin/ruby -e "$(
Expand All @@ -60,45 +60,50 @@ First, install [Homebrew](https://brew.sh/), if you do not already have it. We w
Install the following packages using Homebrew:

```sh
brew install autoconf automake bash bison ccache cmake \
coreutils flex gnu-tar icu4c libtool maven \
ninja pkg-config pstree wget zlib python@2
brew install autoconf automake bash ccache cmake \
coreutils flex gnu-tar icu4c libtool \
maven ninja pkg-config pstree wget \
zlib python@2
```

An older version of `bison` is required to correctly compile the code. The following command installs the required `3.4.1` version of bison.

```sh
brew install \
https://raw.githubusercontent.com/Homebrew/homebrew-core/ee89a1d59df03f495a85c15e253b60299082ab9d/Formula/bison.rb
```

{{< note title="Note" >}}

YugabyteDB 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.
YugabyteDB 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.

{{< /note >}}

## Build the code

## Building the code

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

```sh
cd ~/code/yugabyte-db
./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.
The command above builds the release configuration, puts the C++ binaries in `build/release-gcc-dynamic-community`, and creates the `build/latest` symlink to that directory.

{{< tip title="Tip" >}}

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

{{< /tip >}}

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:

* JDK 8
* [Apache Maven](https://maven.apache.org/).

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`)
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`)

```sh
export PATH=$HOME/tools/apache-maven-3.5.0/bin:$PATH
Expand Down

0 comments on commit c952ee3

Please sign in to comment.