For this recipe, we will need at least three PostgreSQL servers. For demonstration purposes, we'll assume they are named pg1, pg2, and pg3. Follow these steps on all three servers except where indicated:
- Extract the files in the etcd binary distribution and install the necessary files with the following commands as a root-capable user:
tar -xzf etcd-v3.0.14-linux-amd64.tar.gz sudo cp etcd-3.0.14-linux-amd64/etcd* /usr/local/bin
- Create a storage directory for etcd with these commands as a root-level user:
sudo mkdir /db/etcd sudo chown postgres:postgres /db/etcd
- Create a file named /etc/etcd.conf on the pg1 server with these contents:
name: pg1 data-dir: /db/etcd initial-advertise-peer-urls: http://pg1:2380 listen-peer-urls: ...