ubuntu安装etcd

思路:参考官方文档,如果看不懂,再照着博客操作吧!

1、上github,查看安装方法https://github.com/etcd-io/etcd/releases

2、正式第一步,点击上面链接页面中链接,进去下载App Signing Key

      点击“Release signing key can be found at coreos.com/security/app-signing-key.”这个进入到下载页

3、然后执行把下面脚本代码拷贝到本地执行(其实这个脚本也是上面链接页面中的)

ETCD_VER=v3.3.13

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

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

curl -L ${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
rm -f /tmp/etcd-${ETCD_VER}-linux-amd64.tar.gz

/tmp/etcd-download-test/etcd --version
ETCDCTL_API=3 /tmp/etcd-download-test/etcdctl version

4、把上面脚本在本地执行后,本地已经安装了etcd,接下来就是把服务运行起来,并进行测试

5、运行服务

# start a local etcd server
/tmp/etcd-download-test/etcd

6、测试


# write,read to etcd
ETCDCTL_API=3 /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 put foo bar
ETCDCTL_API=3 /tmp/etcd-download-test/etcdctl --endpoints=localhost:2379 get foo

7、到此已经结束了,至于多台机器的,可以参考官方文档去实践。

你可能感兴趣的:(云计算)