一、zk注册中心安装与dubbo控制台

一、zk安装

一、window 环境安装

在这里插入图片描述

二、linux下安装

1、下载zookeeper
网址 https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/
wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.11/zookeeper-3.4.11.tar.gz

2、 解压tar包
在这里插入图片描述

3、 移动到指定位置并改名为zookeepe
在这里插入图片描述

  1. 配置zoo.cfg, 当然也可以把zk注册为开机启动,需要写脚本
    4.1 拷贝/usr/local/zookeeper/conf/zoo_sample.cfg
    到同一个目录下改个名字叫zoo.cfg
    4.2 设置zoo.cfg中的数据存放位置—dataDir=/opt/zk/temp/zookeeper
[root@instance-45oh6r0z conf]# cat zoo.cfg
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/opt/zk/temp/zookeeper   
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

4.3 启动zk 进入到bin目录下运行命令: ./zkServer.sh start

三、安装dubbo-admin管理控制台

dubbo本身并不是一个服务软件。它其实就是一个jar包能够帮你的java程序连接到zookeeper,并利用zookeeper消费、提供服务。所以你不用在Linux上启动什么dubbo服务。

但是为了让用户更好的管理监控众多的dubbo服务,官方提供了一个可视化的监控程序,不过这个监控即使不装也不影响使用,dubbo控制台中可查看注册服务信息消费信息,以及对服务的容错,负载均衡管理。

dubbo的控制台有两个版本:一个war工程,一个是Springboot工程的jar,这讲解jar的安装。

1、下载dubbo-admin https://github.com/apache/incubator-dubbo-ops
在这里插入图片描述

2、进入目录,修改dubbo-admin配置
修改 src\main\resources\application.properties 指定zookeeper地址
在这里插入图片描述

3、打包dubbo-admin
mvn clean package -Dmaven.test.skip=true

4、运行dubbo-admin,因为是一个Springboot工程所以可以直接 java -jar 启动
java -jar dubbo-admin-0.0.1-SNAPSHOT.jar

5、访问控制台: http://localhost:7001 即可,注意自己的ip与dubbo控制台的端口我这里是7001
默认使用root/root 登陆
在这里插入图片描述

四、监控中心安装 dubbo-monitor-simple

1 、 监控中心安装
在这里插入图片描述

2、配置监控中心 — dubbo:monitor
在这里插入图片描述

Simple Monitor 挂掉不会影响到 Consumer 和 Provider 之间的调用,所以用于生产环境不会有风险。

Simple Monitor 采用磁盘存储统计信息,请注意安装机器的磁盘限制,如果要集群,建议用mount共享磁盘。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值