本篇内容主要讲解“windows怎么安装consul”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“windows怎么安装consul”吧!
我们提供的服务有:成都做网站、网站制作、微信公众号开发、网站优化、网站认证、蟠龙ssl等。为数千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的蟠龙网站制作公司
windows 安装 consul
下载安装包
官网下载速度慢,不推荐
•官网下载地址:https://www.consul.io/downloads.html•其他下载: https://javapro.lanzous.com/id77xza

解压运行
打开 Windows PowerShell, 使用 .\consul.exe -h 查看命令帮助
PS C:\WINDOWS\system32> d:PS D:\> cd .\consul_1.7.3_windows_amd64\PS D:\consul_1.7.3_windows_amd64> .\consul.exe -hUsage: consul [--version] [--help][ ] Available commands are:acl Interact with Consul's ACLsagent Runs a Consul agentcatalog Interact with the catalogconfig Interact with Consul's Centralized Configurationsconnect Interact with Consul Connectdebug Records a debugging archive for operatorsevent Fire a new eventexec Executes a command on Consul nodesforce-leave Forces a member of the cluster to enter the "left" stateinfo Provides debugging information for operators.intention Interact with Connect service intentionsjoin Tell Consul agent to join clusterkeygen Generates a new encryption keykeyring Manages gossip layer encryption keyskv Interact with the key-value storeleave Gracefully leaves the Consul cluster and shuts downlock Execute a command holding a locklogin Login to Consul using an auth methodlogout Destroy a Consul token created with loginmaint Controls node or service maintenance modemembers Lists the members of a Consul clustermonitor Stream logs from a Consul agentoperator Provides cluster-level tools for Consul operatorsreload Triggers the agent to reload configuration filesrtt Estimates network round trip time between nodesservices Interact with servicessnapshot Saves, restores and inspects snapshots of Consul server statetls Builtin helpers for creating CAs and certificatesvalidate Validate config files/directoriesversion Prints the Consul versionwatch Watch for changes in Consul
体验 consul
运行命令, 体验开发版
PS D:\consul_1.7.3_windows_amd64> .\consul.exe agent -dev
notes: 以开发版运行的时候 K/V 不保存哦~
看到控制台打印信息正常后,访问 http://localhost:8500/ui/dc1/services

持久化数据
新建 server 服务,指定 data-dir 保存数据
consul agent -server -bootstrap-expect 1 -data-dir "D://consul_1.7.3_windows_amd64/consul" -advertise 192.168.0.105 -ui -node=server1 -bind 192.168.0.105 -client 0.0.0.0 -rejoin -config-dir "D://consul_1.7.3_windows_amd64//config"
•-server: consul 服务端•-bootstrap-expect: 在一个 datacenter 中期望提供的 server 节点数目,当该值提供的时候,consul 一直等到达到指定 server 数目的时候才会引导整个集群•-data-dir: 持久化数据目录•-advertise: ip 地址,广播地址•-client: 可访问服务的 ip•-config-dir:配置文件地址
测试 consul 持久化
新增一个 Key/Value
关闭,重新打开还在,ok
windows - consul 的安装到此结束了哦~
到此,相信大家对“windows怎么安装consul”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
网页名称:windows怎么安装consul
文章网址:http://www.jxjierui.cn/article/jjhpdg.html


咨询
建站咨询
