1.环境配置
安装java:linux安装java
安装maven: linux安装maven
安装zookeeper: linux安装zookeeper
2.下载dubbo监控中心代码
dubbo monitor监控中心代码下载地址:https://github.com/apache/incubator-dubbo/releases,找到dubbo-2.6.0并下载(可能并不是按版本号顺序所以要在下面找一找)
3.编译打包dubbo monitor
解压下载的dubbo-2.6.0.tar.gz:
tar -zxvf dubbo-2.6.0.tar.gz
进入dubbo monitor目录
cd incubator-dubbo-dubbo-2.6.0/dubbo-simple/dubbo-monitor-simple
执行编译打包命令
mvn install -Dmaven.test.skip=true
打包后找到dubbo-simple\dubbo-monitor-simple\target\dubbo-monitor-simple-2.6.0-assembly.tar.gz,这就是最终我们要的dubbo monitor监控中心程序
4.修改配置并开放端口
解压上面得到的dubbo-monitor-simple-2.6.0-assembly.tar.gz
tar -zxvf dubbo-monitor-simple-2.6.0-assembly.tar.gz
修改配置文件
cd dubbo-monitor-simple-2.6.0/conf vi dubbo.properties
修改配置文件:
注释:dubbo.registry.address=multicast://224.5.6.7:1234
启用:dubbo.registry.address=zookeeper://127.0.0.1:2181
最后修改没有被占用的端口。
dubbo.container=log4j,spring,registry,jetty dubbo.application.name=simple-monitor dubbo.application.owner= #dubbo.registry.address=multicast://224.5.6.7:1234 dubbo.registry.address=zookeeper://127.0.0.1:2181 #dubbo.registry.address=redis://127.0.0.1:6379 #dubbo.registry.address=dubbo://127.0.0.1:9090 dubbo.protocol.port=7070 dubbo.jetty.port=8090 dubbo.jetty.directory=${user.home}/monitor dubbo.charts.directory=${dubbo.jetty.directory}/charts dubbo.statistics.directory=${user.home}/monitor/statistics dubbo.log4j.file=logs/dubbo-monitor-simple.log dubbo.log4j.level=WARN
要让外部能访问到,防火墙还得开启这个端口,参考linux centos7设置防火墙开放端口
5.启动并测试
cd dubbo-monitor-simple-2.6.0/bin ./start.sh
启动后访问一下: