安装参考:https://etcd.io/docs/v3.5/install/

1、安装预构建的二进制文件

下载地址:https://github.com/etcd-io/etcd/releases/

解压缩归档文件。 这会生成一个包含二进制文件的目录。

将可执行二进制文件添加到您的路径。 例如,重命名和/或移动 二进制文件到您路径中的目录(例如 /usr/local/bin), 或添加 将上一步创建的目录添加到您的路径中。

从 shell 中测试 etcd在你的路上:

如 linux 中

$ etcd --version
etcd Version: 3.5.0
...

2、windows中以服务形式安装

下载 WinSW.NET4.exe 文件 https://github.com/winsw/winsw/releases

放置到 etcd 软件根目录,并修改名称为 etcd_service.exe

创建 服务 同名的 配置文件 etcd_service.xml

内容如下:

<configuration>
  <id>etcd</id>
  <name>Etcd Server</name>
  <description>This is Etcd Service</description>
  <executable>%BASE%/etcd.exe</executable>
  <stopexecutable>%BASE%/etcd.exe</stopexecutable>
  <stoparguments>-s stop</stoparguments>
  <stopparentprocessfirst>true</stopparentprocessfirst>
  <logpath>%BASE%/logs/</logpath>
  <logmode>roll</logmode>
  <depend></depend>
</configuration>

WinSW.NET4.exe的使用参考:https://github.com/winsw/winsw/blob/v2.12.0/doc/installation.md

打开命令行,执行 etcd_service.exe install

然后打开 windows 的服务 如能查看到 如下所示的内容,即成功。

常用命令:

# 安装服务
etcd_service.exe install

# 启动服务
etcd_service.exe start

# 停止服务
etcd_service.exe stop
作者:joker.liu  创建时间:2023-05-16 17:08
最后编辑:admin  更新时间:2023-10-03 20:14