2014-02-08 00:41:03 +00:00
---
layout: "intro"
2014-04-11 00:41:49 +00:00
page_title: "Installing Consul"
2014-02-08 00:41:03 +00:00
sidebar_current: "gettingstarted-install"
2014-10-19 23:40:10 +00:00
description: |-
Consul must first be installed on every node that will be a member of a Consul cluster. To make installation easy, Consul is distributed as a binary package for all supported platforms and architectures. This page will not cover how to compile Consul from source.
2014-02-08 00:41:03 +00:00
---
2014-04-11 00:41:49 +00:00
# Install Consul
2014-02-08 00:41:03 +00:00
2014-04-11 00:41:49 +00:00
Consul must first be installed on every node that will be a member of a
Consul cluster. To make installation easy, Consul is distributed as a
2014-02-08 00:41:03 +00:00
[binary package ](/downloads.html ) for all supported platforms and
2014-04-11 00:41:49 +00:00
architectures. This page will not cover how to compile Consul from
2014-02-08 00:41:03 +00:00
source.
2014-04-11 00:41:49 +00:00
## Installing Consul
2014-02-08 00:41:03 +00:00
2014-04-11 00:41:49 +00:00
To install Consul, find the [appropriate package ](/downloads.html ) for
your system and download it. Consul is packaged as a "zip" archive.
2014-02-08 00:41:03 +00:00
2014-04-11 00:41:49 +00:00
After downloading Consul, unzip the package. Copy the `consul` binary to
2014-02-08 00:41:03 +00:00
somewhere on the PATH so that it can be executed. On Unix systems,
`~/bin` and `/usr/local/bin` are common installation directories,
depending on if you want to restrict the install to a single user or
expose it to the entire system. On Windows systems, you can put it wherever
you would like.
2014-05-13 14:13:04 +00:00
### OS X
If you are using [homebrew ](http://brew.sh/#install ) as a package manager,
than you can install consul as simple as:
2014-10-19 23:40:10 +00:00
```text
$ brew cask install consul
2014-05-13 14:13:04 +00:00
```
if you are missing the [cask plugin ](http://caskroom.io/ ) you can install it with:
2014-10-19 23:40:10 +00:00
```text
$ brew install caskroom/cask/brew-cask
2014-05-13 14:13:04 +00:00
```
2014-02-08 00:41:03 +00:00
## Verifying the Installation
2014-04-11 00:41:49 +00:00
After installing Consul, verify the installation worked by opening a new
terminal session and checking that `consul` is available. By executing
`consul` you should see help output similar to that below:
2014-02-08 00:41:03 +00:00
2014-10-19 23:40:10 +00:00
```text
2014-04-11 00:41:49 +00:00
$ consul
usage: consul [--version] [--help] < command > [< args > ]
2014-02-08 00:41:03 +00:00
Available commands are:
2014-04-11 00:41:49 +00:00
agent Runs a Consul agent
2014-09-01 22:03:37 +00:00
event Fire a new event
exec Executes a command on Consul nodes
2014-02-08 00:41:03 +00:00
force-leave Forces a member of the cluster to enter the "left" state
2014-04-11 00:41:49 +00:00
info Provides debugging information for operators
join Tell Consul agent to join cluster
2014-02-08 00:41:03 +00:00
keygen Generates a new encryption key
2014-04-11 00:41:49 +00:00
leave Gracefully leaves the Consul cluster and shuts down
members Lists the members of a Consul cluster
monitor Stream logs from a Consul agent
2014-09-01 22:03:37 +00:00
reload Triggers the agent to reload configuration files
2014-04-11 00:41:49 +00:00
version Prints the Consul version
2014-08-22 00:35:05 +00:00
watch Watch for changes in Consul
2014-02-08 00:41:03 +00:00
```
2014-04-11 00:41:49 +00:00
If you get an error that `consul` could not be found, then your PATH
2014-05-03 22:23:16 +00:00
environment variable was not setup properly. Please go back and ensure
2014-04-11 00:41:49 +00:00
that your PATH variable contains the directory where Consul was installed.
2014-02-08 00:41:03 +00:00
2014-04-11 00:41:49 +00:00
Otherwise, Consul is installed and ready to go!