Linux安装etcd
下载etcd
进入github的release页面,找到对应的版本及系统并下载
https://github.com/etcd-io/etcd/releases/
wget https://github.com/etcd-io/etcd/releases/download/v3.5.14/etcd-v3.5.14-linux-amd64.tar.gz
解压并移动到指定目录
tar -zxvf etcd-v3.5.14-linux-amd64.tar.gz
cd etcd-v3.5.14-linux-amd64/
# 创建执行目录
mkdir /usr/local/etcd/bin -p
# 创建数据目录
mkdir /usr/local/etcd/data -p
mv etcd* /usr/local/etcd/bin/
配置systemd
vim /etc/systemd/system/etcd.service
systemctl daemon-reload
systemctl enable etcd.service --now
systemctl status etcd.service
systemd service内容
[Unit]
Description=etcd Key Value Store
Documentation=https://etcd.io
After=network.target
[Service]
;User=etcd
Type=notify
ExecStart=/usr/local/etcd/bin/etcd --data-dir=/usr/local/etcd/data --advertise-client-urls=http://0.0.0.0:21379 --listen-client-urls=http://0.0.0.0:21379
Restart=on-failure
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
未经允许,禁止转载。