Tiven Wang
Wang Tiven June 20, 2018
425 favorite favorites
bookmark bookmark
share share

etcd is A distributed, reliable key-value store for the most critical data of a distributed system.

学习 etcd 最好的方式是先安装一个 etcd 的试验环境,如果你想要在自己的本机或者虚拟机系统安装 etcd 软件包可以使用下面的命令

Local machine install etcd

ETCD_VER=v3.3.8

# choose either URL
GOOGLE_URL=https://storage.googleapis.com/etcd
GITHUB_URL=https://github.com/coreos/etcd/releases/download
DOWNLOAD_URL=${GITHUB_URL}

rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
rm -rf /tmp/etcd-download-test && mkdir -p /tmp/etcd-download-test

wget ${DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz -O /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz
tar xzvf /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz -C /tmp/etcd-download-test --strip-components=1
mv /tmp/etcd-download-test/etcd* /bin/

rm -rf /tmp/etcd-download-test
rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz

etcd --version
ETCDCTL_API=3 etcdctl version

如果你喜欢使用 Docker 环境来练习,则可以使用下面的命令

docker run -d -p 4001:4001 -p 2480:2380 -p 2479:2379 --name etcd gcr.io/etcd-development/etcd:v3.3.8 /usr/local/bin/etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379

https://docs.microsoft.com/en-us/windows/wsl/install-win10#install-the-windows-subsystem-for-linux

Similar Posts

Comments

Back to Top