#
解开压缩包,需安装unzip:
yum install unzip -y
#
解压压缩包
unzip etcdkeeper-*-linux_x86_64.zip
#
删除压缩包
rm etcdkeeper-*-linux_x86_64.zip
#编译etcdkeeper
cd etcdkeeper chmod +x etcdkeeper
|
#进入到system目录
cd /lib/systemd/system
创建:
etcdkeeper.service
vim etcdkeeper.service
etcdkeeper.service
中填写以下内容
Description=etcdkeeper service
After=network.target
[Service]
Type=simple
ExecStart=/
路径
/etcdkeeper/etcdkeeper -h
IP地址
-p 8800 ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
PrivateTmp=true
|
systemctl start etcdkeeper
--
启动etcdkeeper服务
systemctl stop etcdkeeper
--
停止etcdkeeper服务
systemctl enable etcdkeeper.service
--
设置开机自启动
systemctl disable etcdkeeper.service
--
停止开机自启动
|