Rate This Document
Findability
Accuracy
Completeness
Readability

Deploying etcd

  1. Download the source package. In this example, the source package is saved to the /home directory.
    cd /home
    wget https://codeload.github.com/etcd-io/etcd/tar.gz/refs/tags/v3.1.20
    mv v3.1.20 etcd-3.1.20.tar.gz
  2. Decompress the source package. Rename the generated folder to etcd and save it to the /usr/local directory.
    tar -zxvf etcd-3.1.20.tar.gz
    mv etcd-3.1.20 /usr/local/etcd
  3. Set environment variables.
    1. Open the /etc/profile file.
      vim /etc/profile
    2. Press i to enter the insert mode and add the following content to the end of the file. By default, etcd V2 is used. The API of etcd V3 is needed here.
      export ETCDCTL_API=3
      export ETCD_UNSUPPORTED_ARCH=arm64
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Make the environment variables take effect.
    source /etc/profile
  5. Perform the compilation.
    cd /usr/local/etcd
    ./build

    If an error is reported during the compilation, see "Not a git repository" Displayed When Compiling etcd, "no required module provides package" Displayed When Compiling etcd, and "Needed a single revision" Displayed When Compiling etcd.

  6. Search for the generated path. After the compilation is successful, two executable files etcd and etcdctl are generated in the /usr/local/etcd/bin directory.
    ls /usr/local/etcd/bin

  7. Create a data storage path.
    mkdir -p /usr/local/etcd/data