title | weight | description | minGoVers |
---|---|---|---|
Install |
1150 |
Instructions for installing etcd from pre-built binaries or from source. |
1.2 |
Before installing etcd, see the following pages:
- [Supported platforms][]
- [Hardware recommendations][]
The easiest way to install etcd is from pre-built binaries:
-
Download the compressed archive file for your platform from [Releases][], choosing release [{{< param git_version_tag >}}][tagged-release] or later.
-
Unpack the archive file. This results in a directory containing the binaries.
-
Add the executable binaries to your path. For example, rename and/or move the binaries to a directory in your path (like
/usr/local/bin
), or add the directory created by the previous step to your path. -
From a shell, test that
etcd
is in your path:$ etcd --version etcd Version: {{< psubstr git_version_tag 1 >}} ...
If you have [Go version {{< param minGoVers >}}+][go], you can build etcd from source by following these steps:
-
[Download the etcd repo as a zip file][download] and unzip it, or clone the repo using the following command.
$ git clone -b {{< param git_version_tag >}} https://github.com/etcd-io/etcd.git
To build from
{{< param github_branch >}}@HEAD
, omit the-b {{< param git_version_tag >}}
flag. -
Change directory:
$ cd etcd
-
Run the build script:
$ ./build.sh
The binaries are under the
bin
directory. -
Add the full path to the
bin
directory to your path, for example:$ export PATH="$PATH:`pwd`/bin"
-
Test that
etcd
is in your path:$ etcd --version
Disclaimer: etcd installations through OS package managers can deliver outdated versions since they are not being automatically maintained nor officially supported by etcd project. Therefore use OS packages with caution.
There are various ways of installing etcd on different operating systems and these are just some examples how it can be done.
- Update homebrew:
$ brew update
- Install etcd:
$ brew install etcd
- Verify install
$ etcd --version
Although installing etcd through many major Linux distributions' official repositories and package managers is possible, the published versions can be significantly outdated. So, installing this way is strongly discouraged.
The recommended way to install etcd on Linux is either through pre-built binaries or by using Homebrew.
[Homebrew can run on Linux], and can provide recent software versions.
-
Prerequisites
-
Update Homebrew:
$ brew update
-
-
Procedure
-
Install using
brew
:$ brew install etcd
-
-
Result
-
Verify installation by getting the version:
$ etcd --version etcd Version: {{< psubstr git_version_tag 1 >}} ...
-
- [Running etcd as a Kubernetes StatefulSet][]
The etcd project does not currently maintain a helm chart, however you can follow the instructions provided by [Bitnami's etcd Helm chart].
For a slightly more involved sanity check of your installation, see [Quickstart][].
[download]: https://github.com/etcd-io/etcd/archive/{{< param git_version_tag >}}.zip [go]: https://golang.org/doc/install [Hardware recommendations]: {{< relref "op-guide/hardware" >}} [Quickstart]: {{< relref "quickstart" >}} [Running etcd as a Kubernetes StatefulSet]: {{< relref "op-guide/kubernetes" >}} [releases]: https://github.com/etcd-io/etcd/releases/ [tagged-release]: https://github.com/etcd-io/etcd/releases/tag/{{< param git_version_tag >}} [Supported platforms]: {{< relref "op-guide/supported-platform" >}} [Bitnami's etcd Helm chart]: https://bitnami.com/stack/etcd/helm [Homebrew can run on Linux]: https://docs.brew.sh/Homebrew-on-Linux