Dubbo : ZooKeeper安装配置(一)
2017-09-17 02:17
423 查看
目录:
目录dubbo简介
注册中心介绍
下载安装
ZooKeeper启动命令
dubbo简介
简介:百度百科
官网
GitHub
注册中心介绍
注册中心负责服务地址的注册与查找,相当于目录服务,服务提供者和消费者只在启动 时与注册中心交互,注册中心不转发请求,压力较小监控中心负责统计各服务调用次数,调用时间等,统计先在内存汇总后每分钟一次发送 到监控中心服务器,并以报表展示
服务提供者向注册中心注册其提供的服务,并汇报调用时间到监控中心,此时间不包含 网络开销
服务消费者向注册中心获取服务提供者地址列表,并根据负载算法直接调用提供者,同 时汇报调用时间到监控中心,此时间包含网络开销
注册中心,服务提供者,服务消费者三者之间均为长连接,监控中心除外
注册中心通过长连接感知服务提供者的存在,服务提供者宕机,注册中心将立即推送事 件通知消费者
注册中心和监控中心全部宕机,不影响已运行的提供者和消费者,消费者在本地缓存了 提供者列表
注册中心和监控中心都是可选的,服务消费者可以直连服务提供者
注册中心可以自由选择如:redis,zookeeper等,官方推荐zookeeper,这边文章讲解如何在linux上下载安装zookeeper。
下载安装
下载地址 : 官方下载cd /usr/local/ tar -xzvf zookeeper-3.4.6.tar.gz cd zookeeper-3.4.6 mkdir data mkdir logs cd conf/ cp zoo_sample.cfg zoo.cfg vi zoo.cfg
zoo.cfg
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. # do not use /tmp for storage, /tmp here is just # example sakes. #dataDir=/tmp/zookeeper dataDir=/usr/local/zookeeper-3.4.6/data #数据目录 dataLogDir=/usr/local/zookeeper-3.4.6/logs #日志目录 # the port at which the clients will connect clientPort=2181 # the maximum number of client connections. # increase this if you need to handle more clients #maxClientCnxns=60 # # Be sure to read the maintenance section of the # administrator guide before turning on autopurge. # # http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance # # The number of snapshots to retain in dataDir #autopurge.snapRetainCount=3 # Purge task interval in hours # Set to "0" to disable auto purge feature #autopurge.purgeInterval=1
配置zookeeper环境变量
vi /etc/profile
增加
export ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.6 export PATH=$ZOOKEEPER_HOME/bin:$PATH
使配置生效
source /etc/profile
ZooKeeper启动命令
cd /usr/local/zookeeper-3.4.6/bin ./zkServer.sh start
#停止zookeeper命令 ./zkServer.sh stop #查看zookeeper状态命令 ./zkServer.sh status #Mode:standalone意思是单节点
相关文章推荐
- ZooKeeper 集群的安装、配置、高可用测试 Dubbo 注册中心集群 Zookeeper-3.4.6
- zookeeper安装和使用 windows环境+dubbo管理控制台的安装 【以及】 tomcat启动配置
- 【Dubbo之基本配置和运行(1)】zookeeper安装
- 【Zookeeper&Dubbo系列二】Zookeeper+Dubbo集群安装配置详解
- linux 下安装zookeeper及配置dubbo
- dubbo---zookeeper安装与配置
- Dubbo之——Dubbo 注册中心集群Zookeeper-3.4.9的安装、 配置
- dubbo学习笔记 第一章 zookeeper安装配置
- [置顶] dubbo注册中心zookeeper的安装与配置
- 【Dubbo二】Zookeeper安装与配置
- Dubbo 注册中心集群Zookeeper-3.4.9的安装、 配置
- windows环境dubbox:maven+dubbox+Zookeeper+dubbon-admin 下载,安装,配置
- Dubbo zookeeper 安装配置
- dubbo-admin安装和zookeeper配置
- windows下 zookeeper dubbo 安装+配置+demo 详细图文教程
- windows下 zookeeper dubbo 安装+配置+demo 详细图文教程
- dubbo+zookeeper安装配置
- Zookeeper3.4.9、Hbase1.3.1、Pig0.16.0安装及配置(基于Hadoop2.7.3集群)
- Zookeeper 集群的安装和配置
- ZooKeeper 安装、配置