部署
mkdir -p etcd/ cd etcd/ # 下载etcd wget https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz # 把etcd压到一个本地目录 {etcd-dir} tar -zxvf etcd-v3.3.13-linux-amd64.tar.gz # 把 {etcd-dir} 加到 PATH 环境变量。 export PATH=$PATH:/root/etcd/etcd-v3.3.13-linux-amd64 # 创建一个目录 {db-dir} 用来保存 etcd 的数据文件。 mkdir -p etcd-db/ cd etcd-db/ # 使用最新的 v3 API export ETCDCTL_API=3 # 查看etcd版本 etcd -version etcd Version: 3.3.13 Git SHA: 98d3084 Go Version: go1.10.8 Go OS/Arch: linux/amd64 # 启动etcd,在 {db-dir} 目录运行 etcd 启动 etcd 服务 etcd 2022-05-03 22:56:08.196843 I | etcdmain: etcd Version: 3.3.13 2022-05-03 22:56:08.196884 I | etcdmain: Git SHA: 98d3084 2022-05-03 22:56:08.196888 I | etcdmain: Go Version: go1.10.8 2022-05-03 22:56:08.196892 I | etcdmain: Go OS/Arch: linux/amd64 2022-05-03 22:56:08.196896 I | etcdmain: setting maximum number of CPUs to 1, to tal number of available CPUs is 1 2022-05-03 22:56:08.196905 W | etcdmain: no data-dir provided, using default dat a-dir ./default.etcd 2022-05-03 22:56:08.197222 I | embed: listening for peers on http://localhost:23 80 2022-05-03 22:56:08.197291 I | embed: listening for client requests on localhost :2379 2022-05-03 22:56:08.201559 I | etcdserver: name = default 2022-05-03 22:56:08.201570 I | etcdserver: data dir = default.etcd 2022-05-03 22:56:08.201575 I | etcdserver: member dir = default.etcd/member 2022-05-03 22:56:08.201578 I | etcdserver: heartbeat = 100ms 2022-05-03 22:56:08.201581 I | etcdserver: election = 1000ms 2022-05-03 22:56:08.201584 I | etcdserver: snapshot count = 100000 2022-05-03 22:56:08.201591 I | etcdserver: advertise client URLs = http://localh ost:2379 2022-05-03 22:56:08.201595 I | etcdserver: initial advertise peer URLs = http:// localhost:2380 2022-05-03 22:56:08.201601 I | etcdserver: initial cluster = default=http://loca lhost:2380 2022-05-03 22:56:08.205173 I | etcdserver: starting member 8e9e05c52164694d in c luster cdf818194e3a8c32 2022-05-03 22:56:08.205210 I | raft: 8e9e05c52164694d became follower at term 0 2022-05-03 22:56:08.205224 I | raft: newRaft 8e9e05c52164694d [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0] 2022-05-03 22:56:08.205228 I | raft: 8e9e05c52164694d became follower at term 1 2022-05-03 22:56:08.210992 W | auth: simple token is not cryptographically signe d 2022-05-03 22:56:08.214150 I | etcdserver: starting server... [version: 3.3.13, cluster version: to_be_decided] 2022-05-03 22:56:08.215983 I | etcdserver: 8e9e05c52164694d as single-node; fast -forwarding 9 ticks (election ticks 10) 2022-05-03 22:56:08.216449 I | etcdserver/membership: added member 8e9e05c521646 94d [http://localhost:2380] to cluster cdf818194e3a8c32 2022-05-03 22:56:09.205424 I | raft: 8e9e05c52164694d is starting a new election at term 1 2022-05-03 22:56:09.205458 I | raft: 8e9e05c52164694d became candidate at term 2 2022-05-03 22:56:09.205472 I | raft: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 2 2022-05-03 22:56:09.205484 I | raft: 8e9e05c52164694d became leader at term 2 2022-05-03 22:56:09.205490 I | raft: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 2 2022-05-03 22:56:09.205918 I | etcdserver: setting up the initial cluster versio n to 3.3 2022-05-03 22:56:09.205982 I | etcdserver: published {Name:default ClientURLs:[h ttp://localhost:2379]} to cluster cdf818194e3a8c32 2022-05-03 22:56:09.206092 E | etcdmain: forgot to set Type=notify in systemd se rvice file? 2022-05-03 22:56:09.206100 I | embed: ready to serve client requests 2022-05-03 22:56:09.206620 N | embed: serving insecure client requests on 127.0. 0.1:2379, this is strongly discouraged! 2022-05-03 22:56:09.207222 N | etcdserver/membership: set the initial cluster ve rsion to 3.3 2022-05-03 22:56:09.207262 I | etcdserver/api: enabled capabilities for version 3.3 proto: no coders for int proto: no encoder for ValueSize int [GetProperties]
标签:03,2022,22,05,部署,56,etcd From: https://www.cnblogs.com/libruce/p/16657375.html