To install etcd from the official Debian/Ubuntu apt repositories:
You can check the version installed and the latest available version. If the version installed is out of date and you want to install the latest one, use the prebuilt binaries method.
RedHat-compatible packages
The PGDG yum extras repositories contains etcd packages.
Depending on your system, enable the following repositories:
RHEL 9: pgdg-rhel9-extras
RHEL 8: pgdg-rhel8-extras
RHEL 7: pgdg-rhel7-extras
For example, this command installs etcd on RHEL 8:
You can check the version installed and the latest available version. If the version installed is out of date and you want to install the latest one, use the prebuilt binaries method.
Prebuilt binaries
These commands output the version of the installed etcd binary and get the latest version from the etcd-io website:
The easiest way to install the etcd latest release is from prebuilt binaries.
On amd64 hosts, use the following commands:
Then, create the data directory and system user:
Configure the systemd unit file:
Configuration
Configure the firewall if needed:
To configure and create a new etcd cluster, you need to define the initial cluster configuration by setting the ETCD_INITIAL_CLUSTER variable. That list must contain all the etcd hosts and their IP addresses.