cn_wumo
文章4
标签4
分类4
CentOS下的etcd的搭建

CentOS下的etcd的搭建

首先是从官网下载etcd所需的工具

1
yum install wget -y

使用wget下载压缩文件

1
wget https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz

更多的版本可以访问

1
https://github.com/etcd-io/etcd/releases

解压当前目录下的压缩文件,删除压缩文件包

1
2
3
wget https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz
tar -xvf etcd-v3.5.0-linux-amd64.tar.gz
rm -rf etcd-v3.5.0-linux-amd64.tar.gz

启动etcd单节点

1
2
3
4
./etcd -name etcd1 \
-advertise-client-urls http://0.0.0.0:2379 \
-listen-client-urls http://0.0.0.0:2379 \
-initial-advertise-peer-urls http://0.0.0.0:2380

测试节点状态

1
./etcdctl endpoint status

返回127.0.0.1:2379, 1c70f9bbb41018f, 3.5.0, 20 kB, true, false, 2, 4, 4, 表明etcd程序正常运行