kafka之一:Windows上搭建Kafka运行环境
搭建环境
1. 安装JDK
1.1 安装文件:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html下载Server JRE.
1.2 安装完成后需要添加以下的环境变量(右键点击“我的电脑” -> "高级系统设置" -> "环境变量" ):
JAVA_HOME: C:\Java\jdk1.8.0_31(这个是默认安装路径,如果安装过程中更改了安装目录,把更改后的路径填上就行了)
PATH: 在现有的值后面添加"; %JAVA_HOME%\bin"
1.3 打开cmd运行 "java -version" 查看当前系统Java的版本:

2. 安装Zookeeper
Kafka的运行依赖于Zookeeper,所以在运行Kafka之前我们需要安装并运行Zookeeper
# The number of milliseconds of each tick
tickTime=
# The number of ticks that the initial
# synchronization phase can take
initLimit=
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=
# the directory where the snapshot is stored.
dataDir=D:\\tmp\\data\\zookeeper
#日志位置
dataLogDir=D:\\tmp\\logs\\zookeeper
# the port at which the clients will connect
clientPort=
zkserver
3. 安装并运行Kafka
D:\soft\kafka\kafka_2.-0.10.1.1\bin\windows>kafka-server-start.bat ..\..\config\server.properties
结果:

4. 创建topics
kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

查看创建结果:
D:\soft\kafka\kafka_2.10-0.10.1.1\bin\windows>kafka-topics.bat --list --zookeeper localhost:2181

5. 打开一个Producer:
D:\soft\kafka\kafka_2.-0.10.1.1\bin\windows>kafka-console-producer.bat --broker-list localhost: --topic test
6. 打开一个Consumer:
D:\soft\kafka\kafka_2.10-0.10.1.1\bin\windows>kafka-console-consumer.bat --zookeeper localhost:2181 --topic test
kafka之一:Windows上搭建Kafka运行环境的更多相关文章
- Windows上搭建Flume运行环境
1.如果没有安装过Java环境,则需首先安装JDK. 可参考<Windows上搭建Kafka运行环境>中的搭建环境安装JDK部分 2.官方下载Flume(当前为apache-flume-1 ...
- (转)Windows上搭建Kafka运行环境
转自:<Windows上搭建Kafka运行环境> 完整解决方案请参考: Setting Up and Running Apache Kafka on Windows OS 在环境搭建过 ...
- [转]Windows上搭建Kafka运行环境
[转]http://www.cnblogs.com/alvingofast/p/kafka_deployment_on_windows.html Windows上搭建Kafka运行环境 完整解决方 ...
- 如何在Windows上搭建Android开发环境
Android开发越来越火,许多小伙伴们纷纷学习Android开发,学习Android开发首要任务是搭建Android开发环境,由于大家 主要实在Windows 上开发Android,下面就详细给大家 ...
- Windows上搭建Kafka运行环境
完整解决方案请参考: Setting Up and Running Apache Kafka on Windows OS 在环境搭建过程中遇到两个问题,在这里先列出来,以方便查询: 1. \Jav ...
- 在Windows上搭建kafka环境
英文文档:https://dzone.com/articles/running-apache-kafka-on-windows-os 第一步:安装JDK 百度很多,不赘述 第二步:安装ZooKeepe ...
- Windows上搭建hadoop开发环境
前言 Windows下运行Hadoop,通常有两种方式:一种是用VM方式安装一个Linux操作系统,这样基本可以实现全Linux环境的Hadoop运行:另一种是通过Cygwin模拟Linux环境.后者 ...
- Ubuntu上搭建比特币运行环境
Ubuntu版本:16.04.3 Bitcoin Core版本:0.16 1. 比特币运行依赖的开源库 (1)必须依赖的库 库 目的 描述 libssl 加密 随机数生成,椭圆曲线加密算法 libbo ...
- Windows上搭建android开发环境
在搭建android开发环境时需要四部分内容,框架如下 其中Java SDK和Eclipse在java4android中有过介绍,重点介绍ADT和Android SDK的安装. 安装Android S ...
随机推荐
- 我的Android进阶之旅------>启动Activity的标准Action和标准Category
Android内部提供了大量标准的Action和Category常量. 除了参考本文外,您还可以参考了以下链接: http://developer.android.com/reference/andr ...
- PHP环境变量归纳(转自网络)
PHP环境变量主要有$GLOBALS[].$_SERVER[].$_GET[].$_POST[].$_COOKIE[].$_FILES[].$_ENV[].$_REQUEST[].$_SESSION[ ...
- c++得到本地username和IP
bool CDlgResetAlarmInfo::GetLocalUserNameAddIP(CString &a_lstrUserName ,CString &a_IpStr) { ...
- 003-unity3d 物理引擎简介以及示例
一.概述 物理引擎就是模拟真实世界中物体碰撞.跌落等反应的引擎,通过ballence.愤怒的小鸟等理解.Unity3D的物理引擎使用的是Nvidia的PhysX. 物理引擎是一个计算机程序模拟牛顿力学 ...
- onclick事件表示方法
onclick事件表示方法 1.第一种是直接在html中插入onclick事件 & ...
- weak 的内部实现原理
问题 weak 变量在引用计数为0时,会被自动设置成 nil,这个特性是如何实现的? 答案 在 Friday QA 上,有一期专门介绍 weak 的实现原理.https://mikeash.com/p ...
- shell一些方法
字符串截取转自原文地址:http://www.jb51.net/article/56563.htm 一:字符串截取 有var变量: var=http://www.aaa.com/123.htm 1. ...
- 【leetcode刷题笔记】Linked List Cycle
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using ext ...
- grep egrep
grep: Global search REgular expression and Print out the line. 作用: 文本搜索工具,根据用户指定的“模式”对目标文本逐行进行匹配检查:打 ...
- Windows下Nginx的启动、停止等命令添加
Windows下Nginx的启动.停止等命令在Windows下使用Nginx,我们需要掌握一些基本的操作命令,比如:启动.停止Nginx服务,重新载入Nginx等,下面我就进行一些简单的介绍.1.启动 ...
