consul/website/pages/intro/getting-started/install.mdx

60 lines
2.2 KiB
Plaintext
Raw Normal View History

2014-02-08 00:41:03 +00:00
---
2020-04-07 18:55:19 +00:00
layout: intro
page_title: Installing Consul
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
---
# 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
2020-04-09 23:46:54 +00:00
[binary package](/downloads) for all supported platforms and architectures.
2017-04-04 16:40:53 +00:00
This page will not cover how to compile Consul from source, but compiling from
2020-04-09 23:20:00 +00:00
source is covered in the [documentation](/docs) for those who want to
2017-04-04 16:40:53 +00:00
be sure they're compiling source they trust into the final binary.
2014-02-08 00:41:03 +00:00
## Installing Consul
2014-02-08 00:41:03 +00:00
2020-04-09 23:46:54 +00:00
To install Consul, find the [appropriate package](/downloads) 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-02-08 00:41:03 +00:00
## Verifying the Installation
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 this:
2014-02-08 00:41:03 +00:00
2020-05-19 18:32:38 +00:00
```shell-session
$ consul
usage: consul [--version] [--help] <command> [<args>]
2014-02-08 00:41:03 +00:00
Available commands are:
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
```
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
## Next Steps
Consul is installed and ready for operation. Let's
2020-04-09 23:46:54 +00:00
[run the agent](/intro/getting-started/agent)!