一台Centos7的服务器,我的IP:172.16.4.67
登陆到服务器,切换到root用户
#cd /tmp
下载安装包,下载地址:https://github.com/etcd-io/etcd/releases
# wget https://github.com/etcd-io/etcd/releases/download/v3.3.13/etcd-v3.3.13-linux-amd64.tar.gz
解压文件
# tar -zxvf etcd-v3.3.13-linux-amd64.tar.gz
# cd etcd-v3.3.13-linux-amd64
目录下有两个可执行文件etcd 和 etcdctl
# cp etcd /usr/bin/
# cp etcdctl /usr/bin/
配置服务:
# vim /usr/lib/systemd/system/etcd.service (添加以下内容)
[Unit]
Description=Etcd Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/var/lib/etcd/
EnvironmentFile=-/etc/etcd/etcd.conf
ExecStart=/usr/bin/etcd
[Install]
WantedBy=multi-user.target
# mkdir -p /var/lib/etcd
# mkdir -p /etc/etcd
# vim /etc/etcd/etcd.conf (添加以下内容)
#[member]
ETCD_NAME=default
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_CLIENT_URLS="http://172.16.4.67:2379"
ETCD_ADVERTISE_CLIENT_URLS="http://172.16.4.67:2379"
# systemctl daemon-reload
# systemctl enable etcd.service
# systemctl start etcd.service
标签:v3.3,13,etcd,lib,Centos7,usr,下单,amd64 From: https://www.cnblogs.com/adjk/p/17007504.html