download
- 个人资源 etcd3.0:
- 野生资源(请采用迅雷,翻墙来下载): wget
install
> tar -zxvf etcd-v0.4.6-linux-amd64.tar.gz> cd etcd-v0.4.6-linux-amd64> cp etcd* /usr/local/bin> etcd -version etcd version 0.4.6
单机启动
集群启动
注意 --data-dir 这个需要清洗 干净 。
nohup etcd --name infra0 --data-dir /var/lib/etcddir --initial-advertise-peer-urls http://10.10.1.92:2380 \ --listen-peer-urls http://10.10.1.92:2380 \ --listen-client-urls http://10.10.1.92:2379,http://127.0.0.1:2379 \ --advertise-client-urls http://10.10.1.92:2379 \ --initial-cluster-token etcd-cluster-1 \ --initial-cluster infra0=http://10.10.1.92:2380,infra1=http://10.10.1.93:2380,infra2=http://10.10.1.94:2380 \ --initial-cluster-state new > etcd.log &
nohup etcd --name infra1 --data-dir /var/lib/etcddir --initial-advertise-peer-urls http://10.10.1.93:2380 \ --listen-peer-urls http://10.10.1.93:2380 \ --listen-client-urls http://10.10.1.93:2379,http://127.0.0.1:2379 \ --advertise-client-urls http://10.10.1.93:2379 \ --initial-cluster-token etcd-cluster-1 \ --initial-cluster infra0=http://10.10.1.92:2380,infra1=http://10.10.1.93:2380,infra2=http://10.10.1.94:2380 \ --initial-cluster-state new > etcd.log &
nohup etcd --name infra2 --data-dir /var/lib/etcddir --initial-advertise-peer-urls http://10.10.1.94:2380 \ --listen-peer-urls http://10.10.1.94:2380 \ --listen-client-urls http://0.0.0.0:2379 \ --advertise-client-urls http://10.10.1.94:2379 \ --initial-cluster-token etcd-cluster-1 \ --initial-cluster infra0=http://10.10.1.92:2380,infra1=http://10.10.1.93:2380,infra2=http://10.10.1.94:2380 \ --initial-cluster-state new > etcd.log &