linux之etcd安装

# 1.下载
 
wget https://github.com/etcd-io/etcd/releases/download/v3.4.6/etcd-v3.4.6-linux-amd64.tar.gz
 
# 2.解压
tar -zxf etcd-v3.4.6-linux-amd64.tar.gz
 
# 3.移动到bin目录
mv etcd-v3.4.6-linux-amd64 /usr/local/etcd
 
# 4.开启端口 2379 -需要外部访问的话可以
firewall-cmd --zone=public --add-port=2379/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all
 
# 5.启动
cd /usr/local/etcd
./etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379
 

curl http://127.0.0.1:2379/v3/keys/message


$ $ETCD_BIN/etcdctl put greeting "Hello, etcd"
OK

$ $ETCD_BIN/etcdctl get greeting
greeting
Hello, etcd


pip install protobuf==3.20 -i https://pypi.tuna.tsinghua.edu.cn/simple/

 

posted @ 2022-08-10 16:27    阅读(393)  评论(0编辑  收藏  举报