- 管理员身份运行CMD
- 输入命令
sc.exe create "Consul" binPath="consul agent -server -bootstrap-expect 4 -data-dir /tmp/consul -node=s1 -bind=192.168.101.3 -ui -rejoin -client 0.0.0.0 -join 192.168.101.3 -config-dir=D:\tmp\consul_conf"
- 运行 services.msc
- 找到 Consul 服务,设置为自动,启动服务。