05SpringCloud - Consul 环境搭建

简介: 05SpringCloud - Consul 环境搭建

参考

要想利用Consul提供的服务实现服务的注册与发现,我们需要搭建Consul Cluster 环境。

在Consul方案中,每个提供服务的节点上都要部署和运行Consul的agent,所有运行Consul agent节点的集合构成Consul Cluster。

Consul agent有两种运行模式:Server和Client。这里的Server和Client只是Consul集群层面的区分,与搭建在Cluster之上 的应用服务无关。

以Server模式运行的Consul agent节点用于维护Consul集群的状态,官方建议每个Consul Cluster至少有3个或以上的运行在Server mode的Agent,Client节点不限。

环境配置如下:

Centos 7

主机名称 IP 作用 是否允许远程访
model1 192.168.232.128 consul server
model2 192.168.232.129 consul client
model3 192.168.232.130 consul client

关闭防火墙

systemctl stop firewalld.service

下载

Consul 最新版的下载地址:

https://releases.hashicorp.com/consul/1.0.1/consul_1.0.1_linux_amd64.zip

下载,然后unzip 解压,得到唯一,一个可执行文件

cd /usr/local/bin/
wget https://releases.hashicorp.com/consul/1.0.1/consul_1.0.1_linux_amd64.zip

解压

unzip consul_1.0.1_linux_amd64.zip

查看是否安装成功

consul

检查版本

consul version

安装完成!!!

目录
相关文章
|
1月前
|
存储 负载均衡 算法
SpringCloud基础 Consul的引入
SpringCloud基础 Consul的引入
20 1
|
8月前
|
算法 网络协议 数据中心
05SpringCloud - Consul常用命令
05SpringCloud - Consul常用命令
30 0
|
8月前
|
网络协议 算法 Java
04SpringCloud 之 Consul 简介
04SpringCloud 之 Consul 简介
29 0
|
8月前
07SpringCloud - Consul项目示例
07SpringCloud - Consul项目示例
16 0
|
8月前
|
Linux
06SpringCloud - Consul高可用及搭建步骤
06SpringCloud - Consul高可用及搭建步骤
28 0
|
10月前
|
应用服务中间件 nginx 数据中心
理解Registrator、Nginx、Consul架构与SpringCloud Feign、grpc、rest通信之间的不同点
在互联网应用领域,服务的动态性需求十分常见,这就对服务的自动发现和可动态扩展提出了很高的要求。
101 0
|
12月前
|
监控
Springcloud整合consul作为注册中心需要注意的问题(No instances available for)
使用consul跟使用zookeeper的整合过程没有太大的区别,就是有一点需要注意, pom文件必须引入一个健康度监控的包,不然报错No instances available for
|
11月前
|
XML 监控 网络协议
手把手教你搭建SpringCloud项目(七)集成Consul服务注册中心
手把手教你搭建SpringCloud项目(七)集成Consul服务注册中心
251 0
|
存储 Cloud Native 安全
【云原生】springcloud07—Consul的服务注册与发现
【云原生】springcloud07—Consul的服务注册与发现