转载:http://www.myexception.cn/open-source/1485302.html
dubbo管理控制台开源部分主要包含:路由规则,动态配置,服务降级,访问控制,权重调整,负载均衡,等管理功能。
1、下载dubbo
地址:http://code.alibabatech.com/mvn/releases/com/alibaba/dubbo-admin/2.4.1/dubbo-admin-2.4.1.war
本人将tomcat安装在/opt/目录下,先删除tomcat/webapps下自带的ROOT文件夹,将下载的war包解压到webapps/ROOT,命令如下:
- unzip dubbo-admin-2.4.1.war -d /opt/apache-tomcat-6.0.37/webapps/ROOT
配置:
(或将dubbo.properties放在当前用户目录下)
- vim webapps/ROOT/WEB-INF/dubbo.properties
配置信息如下:
dubbo.registry.address=zookeeper://127.0.0.1:2181
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest
这边使用的是zookeeper的注册中心。
启动
说明:这边启动tomcat之前必须先启动zookeeper的。
- ./bin/catalina.sh run
- Ctrl + C 停止tomcat
出现以下界面说明安装配置成功,登录密码为root/root
登录成功界面:
http://blog.csdn.net/enson16855/article/details/9140771
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"
/>
|