dubbo管理控制檯及整合zookeeper叢集部署
參考
http://www.mamicode.com/info-detail-168312.html
http://blog.csdn.net/rangqiwei/article/details/19398301
1、下載dubbo控制檯管理war包
http://download.csdn.net/detail/liweifengwf/7784901
下載綠色版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"
/>