服务器使用docker 直接安装, 然后连接。
由于服务器文法访问我们本地的电脑, 所以会连接失败, 所以要想连接远端sentinel就必须把项目部署到服务器上面。
在项目中配置文件这样写
server:
port: 8401
spring:
application:
name: cloudalibaba-sentinel-service
cloud:
nacos:
discovery:
server-addr: 服务器IP地址:8848 #Nacos服务注册中心地址
sentinel:
transport:
dashboard: 远端服务器的ip地址:8858 #配置Sentinel dashboard地址
port: 8719 #记得在上线后的服务器打开8719这个端口
client-ip: 上线后的服务器IP地址
management:
endpoints:
web:
exposure:
include: '*'