github.com/outbrain/consul@v1.4.5/website/source/docs/install/index.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Install Consul"
     4  sidebar_current: "docs-install-install"
     5  description: |-
     6    Installing Consul is simple. You can download a precompiled binary or compile
     7    from source. This page details both methods.
     8  ---
     9  
    10  # Install Consul
    11  
    12  Installing Consul is simple. There are two approaches to installing Consul:
    13  
    14  1. Using a [precompiled binary](#precompiled-binaries)
    15  
    16  1. Installing [from source](#compiling-from-source)
    17  
    18  Downloading a precompiled binary is easiest, and we provide downloads over TLS
    19  along with SHA256 sums to verify the binary. We also distribute a PGP signature
    20  with the SHA256 sums that can be verified.
    21  
    22  ## Precompiled Binaries
    23  
    24  To install the precompiled binary, [download](/downloads.html) the appropriate
    25  package for your system. Consul is currently packaged as a zip file. We do not
    26  have any near term plans to provide system packages.
    27  
    28  Once the zip is downloaded, unzip it into any directory. The `consul` binary
    29  inside is all that is necessary to run Consul (or `consul.exe` for Windows). Any
    30  additional files, if any, aren't required to run Consul.
    31  
    32  Copy the binary to anywhere on your system. If you intend to access it from the
    33  command-line, make sure to place it somewhere on your `PATH`.
    34  
    35  ## Compiling from Source
    36  
    37  To compile from source, you will need [Go](https://golang.org) installed and
    38  configured properly (including a `GOPATH` environment variable set), as well as
    39  a copy of [`git`](https://www.git-scm.com/) in your `PATH`.
    40  
    41    1. Clone the Consul repository from GitHub into your `GOPATH`:
    42  
    43      ```shell
    44      $ mkdir -p $GOPATH/src/github.com/hashicorp && cd !$
    45      $ git clone https://github.com/hashicorp/consul.git
    46      $ cd consul
    47      ```
    48  
    49    1. Bootstrap the project. This will download and compile libraries and tools
    50    needed to compile Consul:
    51  
    52      ```shell
    53      $ make tools
    54      ```
    55  
    56    1. Build Consul for your current system and put the binary in `./bin/`
    57    (relative to the git checkout). The `make dev` target is just a shortcut that
    58    builds `consul` for only your local build environment (no cross-compiled
    59    targets).
    60  
    61      ```shell
    62      $ make dev
    63      ```
    64  
    65  ## Verifying the Installation
    66  
    67  To verify Consul is properly installed, run `consul -v` on your system. You
    68  should see help output. If you are executing it from the command line, make sure
    69  it is on your PATH or you may get an error about Consul not being found.
    70  
    71  ```shell
    72  $ consul -v
    73  ```