ZooKeeper 安装与部署

一、下载

下载地址:http://mirror.bit.edu.cn/apache/zookeeper/stable/apache-zookeeper-3.5.5-bin.tar.gz

二、安装

直接解压到期望文件夹。

三、配置

在解压后的文件夹中添加两个目录,data和logs,用于存储数据与日志。

文件夹conf中,存放配置文件,现有一个名为zoo_sample.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=E:\\environment\\zookeeper\\apache-zookeeper-3.5.5\\data
dataLogDir=E:\\environment\\zookeeper\\apache-zookeeper-3.5.5\\logs
# the port at which the clients will connect
clientPort=2181

四、启动

打开命令提示符,进入bin目录,输入zkServer启动。

E:\environment\zookeeper\apache-zookeeper-3.5.5\bin>zkServer

E:\environment\zookeeper\apache-zookeeper-3.5.5\bin>call "C:\Program Files\Java\jdk1.8.0_181"\bin\java "-Dzookeeper.log.dir=E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\logs" "-Dzookeeper.root.logger=INFO,CONSOLE" "-Dzookeeper.log.file=zookeeper-Kuningasic-server-DESKTOP-KJCEOIF.log" "-XX:+HeapDumpOnOutOfMemoryError" "-XX:OnOutOfMemoryError=cmd /c taskkill /pid %%p /t /f" -cp "E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\build\classes;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\build\lib\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\lib\*;E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf" org.apache.zookeeper.server.quorum.QuorumPeerMain "E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg"
2019-06-12 20:56:27,191 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg
2019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2019-06-12 20:56:27,201 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set
2019-06-12 20:56:27,204 [myid:] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2019-06-12 20:56:27,206 [myid:] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2019-06-12 20:56:27,206 [myid:] - WARN  [main:QuorumPeerMain@125] - Either no config or no quorum defined in config, running  in standalone mode
2019-06-12 20:56:27,208 [myid:] - INFO  [main:ManagedUtil@46] - Log4j found with jmx enabled.
2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@133] - Reading configuration from: E:\environment\zookeeper\apache-zookeeper-3.5.5\bin\..\conf\zoo.cfg
2019-06-12 20:56:27,286 [myid:] - INFO  [main:QuorumPeerConfig@385] - clientPortAddress is 0.0.0.0/0.0.0.0:2181
2019-06-12 20:56:27,287 [myid:] - INFO  [main:QuorumPeerConfig@389] - secureClientPort is not set
2019-06-12 20:56:27,287 [myid:] - INFO  [main:ZooKeeperServerMain@117] - Starting server

原文地址:https://www.cnblogs.com/Currention/p/11012702.html

时间: 2024-08-10 08:18:33

ZooKeeper 安装与部署的相关文章

zookeeper安装及部署

阅读目录 一. 单机安装.配置 二. 集群安装.配置 安装及部署 回到顶部 一. 单机安装.配置 1.下载zookeeper二进制安装包 下载 curl -L -O http://apache.fayea.com/zookeeper/stable/zookeeper-3.4.6.tar.gz 解压 tar zxvf zookeeper-3.4.6.tar.gz 2.设置环境变量 ZOOKEEPER_HOME关键字为添加的配置项 # /etc/profile # System wide envir

Zookeeper安装部署

Zookeeper安装部署 Zookeeper部署(单机模式)   下载ZooKeeper ü  http://zookeeper.apache.org/   解压 ü  tar -zxvf zookeeper-3.4.5.tar.gz   配置.在conf目录下创建一个配置文件zoo.cfg: tickTime=2000 dataDir=/home/hadoop/bigdata/zookeeper/datadataLogDir=/home/hadoop/bigdata/zookeeper/da

ZooKeeper的安装与部署

本文讲述如何安装和部署ZooKeeper. 一.系统要求 ZooKeeper可以运行在多种系统平台上面,表1展示了zk支持的系统平台,以及在该平台上是否支持开发环境或者生产环境. 表1:ZooKeeper支持的运行平台 系统 开发环境 生产环境 Linux 支持 支持 Solaris 支持 支持 FreeBSD 支持 支持 Windows 支持 不支持 MacOS 支持 不支持 ZooKeeper是用Java编写的,运行在Java环境上,因此,在部署zk的机器上需要安装Java运行环境.为了正常

[原创]HBase学习笔记(1)-安装和部署

HBase安装和部署 使用的HBase版本是1.2.4 1.安装步骤(默认hdfs已安装好) # 下载并解压安装包 cd tools/ tar -zxf hbase-1.2.4-bin.tar.gz   # 重命名为hbase mv hbase-1.2.4 hbase # 将hadoop目录下的hdfs-site.xml 和 core-stie.xml拷贝到 hbase下的conf 目录中 cd /home/work/tools/hbase/conf cp /home/work/tools/ha

ZooKeeper学习第二期--ZooKeeper安装配置

一.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境:■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例:■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个"集合体"(ensemble) Zookeeper通过复制来实现高可用性,只要集合体中半数以上的机器处于可用状态,它就能够保证服务继续.为什么一定要超过半数呢?这

ZooKeeper安装配置

一.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境:■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例:■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个“集合体”(ensemble) Zookeeper通过复制来实现高可用性,只要集合体中半数以上的机器处于可用状态,它就能够保证服务继续.为什么一定要超过半数呢?这跟Zook

Kafka安装及部署

阅读目录 一.环境配置 二.操作过程 Kafka介绍 安装及部署 回到顶部 一.环境配置 操作系统:Cent OS 7 Kafka版本:0.9.0.0 Kafka官网下载:请点击 JDK版本:1.7.0_51 SSH Secure Shell版本:XShell 5 回到顶部 二.操作过程 1.下载Kafka并解压 下载: curl -L -O http://mirrors.cnnic.cn/apache/kafka/0.9.0.0/kafka_2.10-0.9.0.0.tgz 解压: tar z

Hue的安装与部署

Hue的安装与部署 hadoop hue Hue 简介 Hue是一个开源的Apache Hadoop UI系统,最早是由Cloudera Desktop演化而来,由Cloudera贡献给开源社区,它是基于Python Web框架Django实现的.通过使用Hue我们可以在浏览器端的Web控制台上与Hadoop集群进行交互来分析处理数据,例如操作HDFS上的数据,运行MapReduce Job等等.很早以前就听说过Hue的便利与强大,一直没能亲自尝试使用,下面先通过官网给出的特性,通过翻译原文简单

ZooKeeper安装配置(转载)

转载自:http://www.cnblogs.com/sunddenly/p/4018459.html 一.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. ■ 单机模式:Zookeeper只运行在一台服务器上,适合测试环境:■ 伪集群模式:就是在一台物理机上运行多个Zookeeper 实例:■ 集群模式:Zookeeper运行于一个集群上,适合生产环境,这个计算机集群被称为一个"集合体"(ensemble) Zookeeper通过复制