TIPS本文基于Consul 1.5.3,理论适用于Consul 1.6及更低版本。html
百度盘加速器(Consul 1.5.3)spring
连接: https://pan.baidu.com/s/1Kyw5_duxW2TvEqb17YV9WQ 提取码: kfjt 复制这段内容后打开百度网盘手机App,操做更方便哦
Use | Default Ports |
---|---|
DNS: The DNS server (TCP and UDP) | 8600 |
HTTP: The HTTP API (TCP Only) | 8500 |
HTTPS: The HTTPs API | disabled (8501)* |
gRPC: The gRPC API | disabled (8502)* |
LAN Serf: The Serf LAN port (TCP and UDP) | 8301 |
Wan Serf: The Serf WAN port TCP and UDP) | 8302 |
server: Server RPC address (TCP Only) | 8300 |
Sidecar Proxy Min: Inclusive min port number to use for automatically assigned sidecar service registrations. | 21000 |
Sidecar Proxy Max: Inclusive max port number to use for automatically assigned sidecar service registrations. | 21255 |
检查端口是否被占用的方法:ide
Windows: # 若是没有结果说明没有被占用 netstat -ano| findstr "8500" Linux: # 若是没有结果说明没有被占用 netstat -antp |grep 8500 macOS: # 若是没有结果说明没有被占用 netstat -ant | grep 8500 或 lsof -i:8500
consul
所在目录执行以下命令便可:ui
./consul agent -dev -ui -client 0.0.0.0
验证是否成功code
./consul -v
localhost:8500
,可正常访问页面。TIPS目前暂时能够不关注,在后面Consul高可用一节,会列出全部经常使用的Consul启动参数。server
https://demo.consul.io
http://consul.itmuch.com:8500