1. 添加环境变量
#ZooKeeper VARIABLES START
export ZOOKEEPER_HOME=/usr/local/zookeeper-3.4.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin
#ZooKeeper VARIABLES END
  1. 修改ZooKeeper配置文件

    conf/zoo.cfg
# 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=/usr/local/zookeeper-3.4.6/data
dataLogDir=/usr/local/zookeeper-3.4.6/log
# 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
server.1=master:2888:3888
server.2=slave1:2888:3888
server.3=slave2:2888:3888
  1. 创建 log/,并添加data/myid
master data/myid    1
slave1 data/myid 2
slave1 data/myid 3

最新文章

  1. .Net Core上也可以使用的二维码组件
  2. mongoDB的安装(一)
  3. Mac OS X系统下利用VirtualBox安装和配置Windows XP虚拟机
  4. SparkSQL On Yarn with Hive,操作和访问Hive表
  5. Google搜索解析
  6. Android onConfigurationChanged(Configuration cfg) 无法触发问题
  7. MySql安装与卸载
  8. 根据Model有值的自动生成添加的Sql语句
  9. android 录制视频方式
  10. 为Markdown文件生成目录
  11. EF6CodeFirst+MVC5+Autofac泛型注册 入门实例
  12. SQL Server 虚拟化(1)——虚拟化简介
  13. Qt 滚动窗口类
  14. CCF 消息传递接口 (队列) 201903-4 (100分)
  15. 【CSS】面试知识整理
  16. [破解] nasca drm file -ver1.00
  17. gmtdefaults locate
  18. [疯狂Java]JDBC:PreparedStatement预编译执行SQL语句
  19. LeetCode: Reverse Nodes in k-Group 解题报告
  20. Android 开发自己的网络收音机2——电台列表(SlidingMenu侧滑栏)

热门文章

  1. JDBC - Oracle PreparedStatement (GeneratedKey kind) ArrayIndexOutOfBoundsException
  2. 类型参数约束 : Controller where T : class,new()
  3. PHP 开发环境配置
  4. 删除Android自带软件方法及adb remount 失败解决方案
  5. 【linux】日志管理
  6. phpstorm laravel单元测试 配置
  7. 使用Lucene.Net实现全文检索
  8. transport tablespace将一个表空间下的数据移到另一个表空间
  9. c++ 迭代器库
  10. 输出一个对象的所有属性的值,可以不用反射机制,用JSON处理更方便