See Release Notes for what's new in the latest release, v19.1.4. To upgrade to this release from an older version, see Cluster Upgrade.

Download the Binary

The CockroachDB binary for Linux requires glibc, libncurses, and tzdata, which are found by default on nearly all Linux distributions, with Alpine as the notable exception.

  1. Download the CockroachDB archive for Linux, and extract the binary:

    copy
    icon/buttons/copy
    $ wget -qO- https://binaries.cockroachdb.com/cockroach-v19.1.4.linux-amd64.tgz | tar  xvz
  2. Copy the binary into your PATH so it's easy to execute cockroach commands from any shell:

    copy
    icon/buttons/copy
    cp -i cockroach-v19.1.4.linux-amd64/cockroach /usr/local/bin

    If you get a permissions error, prefix the command with sudo.

  3. Keep up-to-date with CockroachDB releases and best practices:

Use Kubernetes

To orchestrate CockroachDB using Kubernetes, either with configuration files or the Helm package manager, use the following tutorials:

Use Docker

Warning:
Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method.
  1. Install Docker for Linux. Please carefully check that you meet all prerequisites.

  2. Confirm that the Docker daemon is running in the background:

    copy
    icon/buttons/copy
    $ docker version

    If you do not see the server listed, start the Docker daemon.

    Note:
    On Linux, Docker needs sudo privileges.
  3. Pull the image for the v19.1.4 release of CockroachDB from Docker Hub:

    copy
    icon/buttons/copy
    $ sudo docker pull cockroachdb/cockroach:v19.1.4
  4. Keep up-to-date with CockroachDB releases and best practices:

Build from Source

  1. Install the following prerequisites, as necessary:

    C++ compiler Must support C++ 11. GCC prior to 6.0 does not work due to this issue. On macOS, Xcode should suffice.
    Go Version 1.11.6 or higher is required.
    Bash Versions 4+ are preferred, but later releases from the 3.x series are also known to work.
    CMake Versions 3.81+ are known to work.
    Autoconf Version 2.68 or higher is required.

    A 64-bit system is strongly recommended. Building or running CockroachDB on 32-bit systems has not been tested. You'll also need at least 2GB of RAM. If you plan to run our test suite, you'll need closer to 4GB of RAM.

  2. Download the CockroachDB v19.1.4 source archive, and extract the sources:

    copy
    icon/buttons/copy
    $ wget -qO- https://binaries.cockroachdb.com/cockroach-v19.1.4.src.tgz | tar  xvz
  3. In the extracted directory, run make build:

    copy
    icon/buttons/copy
    cd cockroach-v19.1.4
    copy
    icon/buttons/copy
    make build

    The build process can take 10+ minutes, so please be patient.

    Note:
    The default binary contains core open-source functionality covered by the Apache License 2 (APL2) and enterprise functionality covered by the CockroachDB Community License (CCL). To build a pure open-source (APL2) version excluding enterprise functionality, use make buildoss. See this blog post for more details.
  4. Install the cockroach binary into /usr/local/bin so it's easy to execute cockroach commands from any directory:

    copy
    icon/buttons/copy
    make install

    If you get a permissions error, prefix the command with sudo.

    You can also execute the cockroach binary directly from its built location, ./src/github.com/cockroachdb/cockroach/cockroach, but the rest of the documentation assumes you have the binary on your PATH.

  5. Keep up-to-date with CockroachDB releases and best practices:

What's next?

Note:
By default, each node of a CockroachDB cluster periodically shares anonymous usage details with Cockroach Labs. For an explanation of the details that get shared and how to opt-out of reporting, see Diagnostics Reporting.


Yes No