码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu19 安装etcd

时间:2019-12-07 23:20:04      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:新建   pre   test   http   linu   releases   mkdir   ora   cal   

1.新建sh文件etcd_install.sh

ETCD_VER=v3.3.18

# 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
/tmp/etcd-download-test/etcdctl version

2.运行脚本

sh etcd_install.sh

3.启动服务

/tmp/etcd-download-test/etcd

4.测试安装

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

ubuntu19 安装etcd

标签:新建   pre   test   http   linu   releases   mkdir   ora   cal   

原文地址:https://www.cnblogs.com/limengchun/p/12003713.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!