2014-02-08 00:41:03 +00:00
|
|
|
---
|
2020-04-07 18:55:19 +00:00
|
|
|
layout: intro
|
|
|
|
page_title: Installing Consul
|
|
|
|
sidebar_current: gettingstarted-install
|
|
|
|
description: >-
|
|
|
|
Consul must first be installed on every node that will be a member of the
|
|
|
|
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
|
|
|
|
2017-04-04 16:40:53 +00:00
|
|
|
Consul must first be installed on your machine. Consul is distributed as a
|
|
|
|
[binary package](/downloads.html) for all supported platforms and architectures.
|
|
|
|
This page will not cover how to compile Consul from source, but compiling from
|
|
|
|
source is covered in the [documentation](/docs/index.html) for those who want to
|
|
|
|
be sure they're compiling source they trust into the final binary.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
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
|
2017-04-04 16:40:53 +00:00
|
|
|
your system and download it. Consul is packaged as a zip archive.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2017-04-04 16:40:53 +00:00
|
|
|
After downloading Consul, unzip the package. Consul runs as a single binary
|
|
|
|
named `consul`. Any other files in the package can be safely removed and
|
|
|
|
Consul will still function.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2017-04-04 16:40:53 +00:00
|
|
|
The final step is to make sure that the `consul` binary is available on the `PATH`.
|
|
|
|
See [this page](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux)
|
|
|
|
for instructions on setting the PATH on Linux and Mac.
|
|
|
|
[This page](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows)
|
|
|
|
contains instructions for setting the PATH on Windows.
|
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
|
2015-03-02 13:31:32 +00:00
|
|
|
`consul` you should see help output similar to this:
|
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
|
2017-04-04 16:40:53 +00:00
|
|
|
|
|
|
|
# ...
|
2014-02-08 00:41:03 +00:00
|
|
|
```
|
|
|
|
|
2015-03-02 13:31:32 +00:00
|
|
|
If you get an error that `consul` could not be found, your `PATH`
|
|
|
|
environment variable was not set up properly. Please go back and ensure
|
|
|
|
that your `PATH` variable contains the directory where Consul was
|
|
|
|
installed.
|
2014-02-08 00:41:03 +00:00
|
|
|
|
2015-03-02 13:50:13 +00:00
|
|
|
## Next Steps
|
|
|
|
|
|
|
|
Consul is installed and ready for operation. Let's
|
|
|
|
[run the agent](agent.html)!
|