Open zhuangjinxin opened 7 years ago
从Github上下载Dubbo的源码,地址:https://github.com/alibaba/dubbo
https://github.com/alibaba/dubbo
进入目录:cd dubbo-master/dubbo-sample/dubbo-monitor-sample/src/main/assembly/conf 修改dubbo.properties文件:
cd dubbo-master/dubbo-sample/dubbo-monitor-sample/src/main/assembly/conf
dubbo.container=log4j,spring,registry,jetty dubbo.application.name=simple-monitor dubbo.application.owner= dubbo.registry.address=zookeeper://127.0.0.1:2181 dubbo.protocol.port=7070 dubbo.jetty.port=8080 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
dubbo.registry.address换成真实的注册地址 ${user.home}填写真实的用户目录cd ~ pwd查看 在创建${user.home}/monitor/下手动创建charts文件夹: mkdir ~/monitor cd ~/monitor/ mkdir charts
cd ~
pwd
mkdir ~/monitor
cd ~/monitor/
mkdir charts
进入目录:cd dubbo-master/dubbo-sample/dubbo-monitor-sample 修改pom.xml文件中Dubbo的版本:从${project.parent.version}修改成2.5.3
cd dubbo-master/dubbo-sample/dubbo-monitor-sample
${project.parent.version}
2.5.3
<dependencies> <dependency> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>2.5.3</version> </dependency> </dependencies>
<build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack</id> <phase>package</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>com.alibaba</groupId> <artifactId>dubbo</artifactId> <version>2.5.3</version> <outputDirectory>${project.build.directory}/dubbo</outputDirectory> <includes>META-INF/assembly/**</includes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build>
在dubbo-master/dubbo-sample/dubbo-monitor-sample/目录下, 编译打包:mvn package -Dmaven.skip.test=true
dubbo-master/dubbo-sample/dubbo-monitor-sample/
mvn package -Dmaven.skip.test=true
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.918 s [INFO] Finished at: 2017-03-25T11:18:24+08:00 [INFO] Final Memory: 27M/344M [INFO] ------------------------------------------------------------------------
在dubbo-master/dubbo-sample/dubbo-monitor-sample/target/目录下,找到dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz,解压! 进入解压后的目录cd bin,运行./start.sh
dubbo-master/dubbo-sample/dubbo-monitor-sample/target/
dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz
cd bin
./start.sh
➜ bin ./start.sh Starting the simple-monitor ........................OK! PID: 37656 STDOUT: logs/stdout.log
浏览器访问:localhost:8080即可!
https://repo1.maven.org/maven2/com/alibaba/dubbo/
<dubbo:monitor protocol="registry"/>
http://dubbo.io/Administrator+Guide-zh.htm
新版Dubbo更新,解决如下问题:
Dubbo Monitor 效果图
下载
从Github上下载Dubbo的源码,地址:
https://github.com/alibaba/dubbo
打包
进入目录:
cd dubbo-master/dubbo-sample/dubbo-monitor-sample/src/main/assembly/conf
修改dubbo.properties文件:dubbo.registry.address换成真实的注册地址 ${user.home}填写真实的用户目录
cd ~
pwd
查看 在创建${user.home}/monitor/下手动创建charts文件夹:mkdir ~/monitor
cd ~/monitor/
mkdir charts
进入目录:
cd dubbo-master/dubbo-sample/dubbo-monitor-sample
修改pom.xml文件中Dubbo的版本:从${project.parent.version}
修改成2.5.3
在
dubbo-master/dubbo-sample/dubbo-monitor-sample/
目录下, 编译打包:mvn package -Dmaven.skip.test=true
运行
在
dubbo-master/dubbo-sample/dubbo-monitor-sample/target/
目录下,找到dubbo-monitor-simple-2.5.4-SNAPSHOT-assembly.tar.gz
,解压! 进入解压后的目录cd bin
,运行./start.sh
浏览器访问:localhost:8080即可!
提示
https://repo1.maven.org/maven2/com/alibaba/dubbo/
<dubbo:monitor protocol="registry"/>
官方文档
http://dubbo.io/Administrator+Guide-zh.htm