参考
http://www.mamicode.com/info-detail-168312.html
http://blog.csdn.net/rangqiwei/article/details/19398301
继上一篇《dubbo自学笔记》续
1、下载dubbo控制台管理war包
http://download.csdn.net/detail/liweifengwf/7784901
官方地址:http://code.alibabatech.com/mvn/releases/com/alibaba/dubbo-admin/2.4.1/dubbo-admin-2.4.1.war(这个地址我一直下不了,wget也不通)
下载绿色版tomcat,并解压,删掉apache-tomcat-6.0.37\webapps\ROOT文件夹下的内容,并将dubbo-admin-2.4.1.war解压后,解压出的文件放在ROOT文件夹下
修改apache-tomcat-6.0.37\webapps\ROOT\WEB-INF下的dubbo.properties文件的zookeeper地址
dubbo.registry.address=zookeeper://10.102.30.211:2181
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest
2、启动
先启动zookeeper,再启动tomcat
访问:
http://localhost:8080
登录密码默认是:root/root
可以看到控制台管理界面,
这时候可以启动上篇文章中的提供者和消费者,再在dubbo管理控制台界面可以看到
提供者
消费者
Zookeeper单机配置:
<
dubbo:registry
address
=
"zookeeper://10.20.153.10:2181"
/>
Or:
<
dubbo:registry
protocol
=
"zookeeper"
address
=
"10.20.153.10:2181"
/>
Zookeeper集群配置:
<
dubbo:registry
address
=
"zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181,10.20.153.12:2181"
/>
Or:
<
dubbo:registry
protocol
=
"zookeeper"
address
=
"10.20.153.10:2181,10.20.153.11:2181,10.20.153.12:2181"
/>
|
同一Zookeeper,分成多组注册中心:
<
dubbo:registry
id
=
"chinaRegistry"
protocol
=
"zookeeper"
address
=
"10.20.153.10:2181"
group
=
"china"
/>
<
dubbo:registry
id
=
"intlRegistry"
protocol
=
"zookeeper"
address
=
"10.20.153.10:2181"
group
=
"intl"
/>