安装
$ ETCD_VER=v3.1.1
$ DOWNLOAD_URL=https://github.com/coreos/etcd/releases/download
$ curl -L ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -o /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
$ mkdir -p /tmp/test-etcd && tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/test-etcd --strip-components=1
$ /tmp/test-etcd/etcd --version
Git SHA: ac1c7eb
Go Version: go1.7.5
Go OS/Arch: linux/amd64
# start a local etcd server
$ /tmp/test-etcd/etcd
# write,read to etcd
ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=localhost:2379 put foo "bar"
ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=localhost:2379 get foo
参考