Linux系统 eureka集群

server:

  port: 19001

eureka:

  instance:

    instance-id: eureka1:19001

    #instance-id: ${spring.cloud.client.ip-address}:${server.port}

    hostname: eureka1

    #hostname: ${spring.cloud.client.ip-address}

    prefer-ip-address: true

  client:

    registerWithEureka: false

    fetchRegistry: false

    serviceUrl:

      defaultZone: http://eureka2:19002/eureka/,http://eureka3:19003/eureka/

  server:

    enable-self-preservation: false # 是否把自己注册到 eureka

    eviction-interval-timer-in-ms: 4000 # 清理间隔 默认 60*1000

 

eureka服务后台启动

# nohup java -jar eureka-1.0.1.jar -Djava.security.egd=file:/dev/urandom --spring.config.location=./application.yml >/dev/null 2>&1 &

posted @ 2019-09-11 15:54  浮尽繁华  阅读(530)  评论(0编辑  收藏  举报