Etcd 集群安装部署
systemctl 启动
/etc/systemd/system/etcd.service
[Unit]
Description=etcd
Documentation=https://github.com/coreos/etcd
[Service]
Type=notify
Restart=always
RestartSec=5s
LimitNOFILE=40000
TimeoutStartSec=0
EnvironmentFile=-/etc/sysconfig/etcd-ssl
ExecStart=/usr/local/bin/etcd --name etcd1 \
--data-dir /data/bkee/public/etcd \
--listen-client-urls http://<ip1>:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://<ip1>:2379 \
--listen-peer-urls http://<ip1>:2380 \
--initial-advertise-peer-urls http://<ip1>:2380 \
--initial-cluster etcd0=http://<ip0>:2380,etcd1=http://<ip1>:2380,etcd2=http://<ip2>:2380 \
--initial-cluster-state new \
--initial-cluster-token etcd-cluster-token \
--auto-compaction-retention 1
[Install]
WantedBy=multi-user.target
操作命令:
- systemctl enable etcd
- systemctl start etcd