dubbo服务治理中间件,zookeeper注册中心 安装配置
对传统项目架构进行拆分:

集群概念:

面向服务分布式架构:


服务层提供被注册的对象需要实现序列化接口Serializable;
配置表现层和服务层:
依赖包:

服务层:
<!-- 定义dubbo服务名称,此名称可以自定义,用于监控中心监控服务关系 -->
<dubbo:application name="content-service" />
<!-- 使用dubbo通过Zookeeper协议注册服务 -->
<dubbo:registry protocol="zookeeper" address="192.168.74.132:2181" />
<!-- 用dubbo协议在20880端口暴露服务 -->
<dubbo:protocol name="dubbo" port="20881" />
<!-- 声明需要暴露的服务接口 -->
<!-- 创建需要发布对象 -->
<bean id="contentCategoryServiceImpl" class="cn.e3.content.service.impl.ContentCategoryServiceImpl"></bean>
<!-- 发布服务 -->
<dubbo:service interface="cn.e3.content.service.ContentCategoryService"
ref="contentCategoryServiceImpl" />
<!-- 发布内容对象 -->
<bean id="contentServiceImpl" class="cn.e3.content.service.impl.ContentServiceImpl"></bean>
<!-- 发布服务 -->
<dubbo:service interface="cn.e3.content.service.ContentService"
ref="contentServiceImpl" />
表现层:
<!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
<dubbo:application name="manager-web" />
<!-- 使用multicast广播注册中心暴露发现服务地址 -->
<dubbo:registry address="zookeeper://192.168.74.132:2181" />
<!-- 生成远程服务代理,可以和本地bean一样使用demoService -->
<dubbo:reference id="itemService"
interface="cn.e3.manager.service.ItemService" timeout="1000000" retries="2"/>
<!-- 商品类别服务 -->
<dubbo:reference id="itemCatService"
interface="cn.e3.manager.service.ItemCatService" timeout="1000000" retries="2"/>
<!-- 广告分类服务 -->
<dubbo:reference id="contentCategoryService"
interface="cn.e3.content.service.ContentCategoryService" timeout="1000000" retries="2"/>
<!-- 广告内容服务 -->
<dubbo:reference id="contentService"
interface="cn.e3.content.service.ContentService" timeout="1000000" retries="2"/>
<!-- 规格模板服务 -->
<dubbo:reference id="itemParamService"
interface="cn.e3.manager.service.ItemParamService" timeout="1000000" retries="2"/>
<dubbo:reference id="searchItemService"
interface="cn.e3.search.service.SearchItemService" timeout="1000000" retries="2"/>
安装zookeeper注册中心服务器:cd zookeeper/conf,mv zoo_sample.cfg zoo.cfg
配置:vim zoo.cfg


cd ./data ; vi myid (内容为各个节点server后的数字)
启动和登录:


查看节点状态:./zkServer.sh status 同时检测zookeeper是否启动成功
日志查看:cat ./zookeeper.out
查看启动:jps

查看节点信息:ls / ls /dubbo ls /zookeeper
Monitor 监控中心,dubbo-admin-2.5.4.war部署在linux上的tomcat即可;
访问:ip:8080/dubbo/
root root
总结:

dubbo服务治理中间件,zookeeper注册中心 安装配置的更多相关文章
- dubbo服务治理中间件,zookeeper注册中心
对传统项目架构进行拆分: 集群概念: 面向服务分布式架构: 服务层提供被注册的对象需要实现序列化接口Serializable: 配置表现层和服务层: 依赖包: 服务层: <!-- 定义dubbo ...
- Dubbo_创建Dubbo服务并在ZooKeeper注册,然后通过Jar包执行
一.安装ZooKeeper(略) 二.创建Dubbo服务 1.DemoService 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ...
- ZooKeeper注册中心安装详细步骤(单节点)
安装 Dubbo 注册中心 Dubbo 建议使用 Zookeeper 作为服务的注册中心. 注册中心服务器(192.168.3.71)配置,安装 Zookeeper: 1. 修改操作系统的/etc/h ...
- @ZooKeeper注册中心安装(单节点)
1.下载zookeeper 下载地址:https://archive.apache.org/dist/zookeeper/,这里我们使用3.4.6版本. [winner-0715@localhost ...
- zookeeper注册中心安装(单机版)
下载zookeeper-3.4.9.tar.gz wget http://apache.fayea.com/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar. ...
- 使用dubbo中间件的zookeeper注册中心时报错
在项目中搭建soa项目时,使用dubbo服务中间件时需要在虚拟机中创建一个zookeeper注册中心,在配置都没有问题的时候,如果服务端启动成功,但是消费端启动报错并且看不出据地位置时,一定要注意你的 ...
- dubbo实战之三:使用Zookeeper注册中心
欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...
- Dubbo框架应用之(三)--Zookeeper注册中心、管理控制台的安装及讲解
我是在linux下使用dubbo-2.3.3以上版本的zookeeper注册中心客户端.Zookeeper是Apache Hadoop的子项目,强度相对较好,建议生产环境使用该注册中心.Dubbo未对 ...
- Dubbo(二):zookeeper 注册中心
zookeeper 注册中心 Zookeeper 是 Apacahe Hadoop 的子项目,是一个树型的目录服务,支持变更推送,适合作为 Dubbo 服务的注册中心,工业强度较高,可用于生产环境,并 ...
随机推荐
- Linux机器工作环境安装
安装gcc编译器: yum -y install gcc 安装wget: yum -y install wget 安装python-setuptools: wget http://peak.telec ...
- python's twenty-seventh day for me 模
time模块: 1,计算执行代码的时间 time.time() 2,让程序停这里一段时间 time.sleep(时间(s)) 时间戳时间: import time print(time.time()) ...
- linux grep打印匹配的上下几行
$grep -5 'parttern' inputfile //打印匹配行的前后5行 $grep -C 5 'parttern' inputfile //打印匹配行的前后5行 $grep -A 5 ' ...
- ubuntu14.10下Qt5.4无法输入中文
最近学习Qt,于是在ubuntu下安装了开发环境.我是从官网上下载安装的Qt5.4版本.安装后发现在开发过程中无法输入中文.于是在网上搜了搜.解决办法如下: 1.安装fcitx-frontend-qt ...
- mvc 实体类 自定义验证特性
mvc 实体类验证的时候 如果有多个验证特性需要在属性上层叠很多个验证特性,显得属性特别臃肿并且也不够直观,极大地影响我使用它的兴趣,所以我想自定义一个验证特性,然后将所有需要验证的情形全部放在一个特 ...
- List扩展方法汇总(仅备注)
不管在c/s还是b/s的c#语言开发程序中,经常会用到List的扩展方法,尤其在json格式的数据和服务端交互越来越流行,很多时候总是在开发使用到的时候才去搜索有些扩展方法或者linq的用法,在这里, ...
- windows下安装ubuntu 12.04---利用ubuntu的iso包中的wubi.exe工具安装
一.下载ubuntu-12.04-desktop-amd64.iso后,用winrar打开,提取出wubi.exe这个文件.把ubuntu-12.04-desktop-amd64.iso和wubi.e ...
- 局域网内的一些计算机可以ping通 有些ping不同
如何查看.添加.修改.删除电脑内部路由_百度经验https://jingyan.baidu.com/article/77b8dc7fc611626174eab6cb.html
- Basics
[Basics] 1.You can declare multiple constants or multiple variables on a single line, separated by c ...
- 【总结整理】OpenLayers项目分析,OpenLayers中的图层,GeoServer发布wms服务--实验(转)
https://blog.csdn.net/u013751758/article/details/44751315 https://blog.csdn.net/u013751758/article/d ...