美文网首页JavaJava高开发Java 杂谈
Dubbo后台管理和监控中心部署

Dubbo后台管理和监控中心部署

作者: java高并发 | 来源:发表于2019-04-30 17:39 被阅读6次

    通过dubbo监控中心和后台管理可以很好的监控dubbo服务,监控服务端服务和客户端调用情况,调用次数,调用日志,方便问题查找。下面我们看看dubbo的管理后台和监控中心怎么部署。

    1.软件下载

    部署管理后台和监控中心需要以下软件
    

    opensesame 下载地址:https://github.com/alibaba/opensesame

    Dubbo源码下载 https://github.com/alibaba/dubbo

    ![image](https://img.haomeiwen.com/i15593451/a1e78c34755fe21c?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
    
    Tomcat下载地址 [http://tomcat.apache.org/download-70.cgi](http://tomcat.apache.org/download-70.cgi)
    

    2.编译

    image

    下载完成后,解压,切换到opensesame-master目录下(如上图),打开CMD命令,执行如下命令

    mvn install -Dmaven.test.skip=true

    image

    3.dubbo-admin部署

    dubbo管理平台dubbo-admin部署

    解压dubbo-master文件夹,打开CMD命令,切换到dubbo-master目录,执行

    mvn install -Dmaven.test.skip=true命令,完成后,会看到dubbo-admin的target文件夹下有dubbo-admin-2.5.4-SNAPSHOT.war

    如下图

    image

    解压tomcat,将dubbo-admin-2.5.4-SNAPSHOT.war包拷贝到Tomcat的webapps文件夹下

    然后启动tomcat,启动tomcat的方法如下,

    切换到tomcat的bin文件夹,启动startup.bat命令

    在此我向大家推荐一个Java群 :219571750 里面会分享一些资深架构师录制的视频录像:(有Spring,MyBatis,Netty源码分析,高并发、高性能、分布式、微服务架构的原理,JVM性能优化、分布式架构、面试资料)等这些成为架构师必备的知识体系 进群马上免费领取,目前受益良多!

    目录如下

    image

    命令如下

    image

    此时dubbo-admin-2.5.4-SNAPSHOT.war会自动解压,在webapps目录下生成一个dubbo-admin-2.5.4-SNAPSHOT文件夹,

    image

    将webapps下的root文件夹下的内容全部删除,将dubbo-admin-2.5.4-SNAPSHOT文件夹下的内容全部拷贝到Root文件夹下,最终结果如下图

    image

    修改下root文件夹下web-inf文件夹下的dubbo.properties文件,

    文件内容如下

    dubbo.registry.address=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183
    
    dubbo.admin.root.password=root
    
    dubbo.admin.guest.password=guest
    

    打开浏览器输入地址: http://localhost:8080/,输入账号和密码登录guest/guest

    image image

    4.dubbo监控平台monitor部署

    在本地仓库中或者dubbo-monitor-simple项目中找到dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz文件,拷贝到D盘,解压后如下图

    image

    找到conf文件夹下的dubbo.properties文件,修改配置文件如下

    **[html]** [view plain](http://blog.csdn.net/zx13525079024/article/details/52260141# "view plain")[copy](http://blog.csdn.net/zx13525079024/article/details/52260141# "copy")
    
    <embed id="ZeroClipboardMovie_1" src="https://csdnimg.cn/public/highlighter/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16" height="16" name="ZeroClipboardMovie_1" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=1&amp;width=16&amp;height=16" wmode="transparent" style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; overflow-wrap: break-word;">
    
    <embed id="ZeroClipboardMovie_2" src="https://csdnimg.cn/public/highlighter/ZeroClipboard.swf" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="16" height="16" name="ZeroClipboardMovie_2" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id=2&amp;width=16&amp;height=16" wmode="transparent" style="box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; overflow-wrap: break-word;"> 
    
    1.  <span style="font-family:Microsoft YaHei;">##  
    2.  # Copyright 1999-2011 Alibaba Group.  
    3.  #    
    4.  # Licensed under the Apache License, Version 2.0 (the "License");  
    5.  # you may not use this file except in compliance with the License.  
    6.  # You may obtain a copy of the License at  
    7.  #    
    8.  #      http://www.apache.org/licenses/LICENSE-2.0  
    9.  #    
    10.  # Unless required by applicable law or agreed to in writing, software  
    11.  # distributed under the License is distributed on an "AS IS" BASIS,  
    12.  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
    13.  # See the License for the specific language governing permissions and  
    14.  # limitations under the License.  
    15.  ##  
    16.  dubbo.container=log4j,spring,registry,jetty  
    17.  dubbo.application.name=simple-monitor  
    18.  dubbo.application.owner=  
    19.  #dubbo.registry.address=127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183  
    20.  dubbo.registry.address=zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183  
    21.  #dubbo.registry.address=zookeeper://127.0.0.1:2181  
    22.  #dubbo.registry.address=redis://127.0.0.1:6379  
    23.  #dubbo.registry.address=dubbo://127.0.0.1:9090  
    24.  dubbo.protocol.port=7070  
    25.  dubbo.jetty.port=8086  
    26.  dubbo.jetty.directory=${user.home}/monitor  
    27.  dubbo.charts.directory=${dubbo.jetty.directory}/charts  
    28.  dubbo.statistics.directory=${user.home}/monitor/statistics  
    29.  dubbo.log4j.file=logs/dubbo-monitor-simple.log  
    30.  dubbo.log4j.level=WARN  
    31.  </span>  
    
    image

    打开cmd命令行,切换到bin文件夹,执行start.bat命令

    image

    执行完成后,输入地址http://localhost:8086/index.html

    出现如下界面

    image

    相关文章

      网友评论

        本文标题:Dubbo后台管理和监控中心部署

        本文链接:https://www.haomeiwen.com/subject/xjmvnqtx.html