consul下载地址:
https://developer.hashicorp.com/consul/install
启动:cmd进入consul路径下, 输入【consul agent -dev】
查看节点信息:另开CMD输入【consul members】
-dev:dev是consul多种启动模式的一种,dev是development的缩写,代表的是开发模式,该种启动模式仅仅是为了快速便捷的启动单节点consul,比如当前环境。
Consul agent running!:表示该consul节点正常运行起来。
Datacenter:‘dc1’ 表示当前节点所属的数据中心的名称为dc1。
Server:true(bootstrap:false) 表示该节点属于Server角色。Consul节点统称为agent,有两类:Client、Server。
raft: Heartbeat timeout from “” reached, starting election Raft算法开始进行Leader节点选举。
consul: cluster leadership acquired、consul: New leader elected: localhost Leader节点选举结束,本地唯一的节点被选举为leader节点。
consul: member ‘localhost’ joined, marking health alive 目前localhost节点是一个健康正常的节点
停止服务:ctrl+c
UI界面访问:http://localhost:8500