下载etcdetcdkeeper
cd /opt/
wget https://github.com/evildecay/etcdkeeper/releases/download/v0.7.5/etcdkeeper-v0.7.5-linux_x86_64.zip
解压
unzip etcdkeeper-v0.7.5-linux_x86_64.zip
mv etcdkeeper /usr/local/
chmod +x /usr/local/etcdkeeper/etcdkeeper
将etcdkeeper注册成服务
touch /lib/systemd/system/etcdkeeper.service
将下面的内容填充到etcdkeeper.service文件中
[Unit]
Description=etcdkeeper service
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/etcdkeeper/etcdkeeper -p=8880
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
PrivateTmp=true
[Install]
WantedBy=multi-user.target
设置开机自启动
systemctl enable etcdkeeper.service
启动etcdkeeper服务
systemctl start etcdkeeper
停止etcdkeeper服务
systemctl stop etcdkeeper