kafka_2.10-0.8.1.1.tgz的1节点集群 

我这里是使用的是,kafka自带的zookeeper。
以及关于kafka的日志文件啊,都放在默认里即/tmp下,我没修改。保存默认的

1、 [hadoop@sparksinglenode kafka_2.10-0.8.1.1]$ jps
2625 Jps
2、 [hadoop@sparksinglenode kafka_2.10-0.8.1.1]$ bin/zookeeper-server-start.sh config/zookeeper.properties & 
此刻,这时,会一直停在这,因为是前端运行。
另开一窗口,
3、 [hadoop@sparksinglenode kafka_2.10-0.8.1.1]$ bin/kafka-server-start.sh config/server.properties &
也是前端运行。

推荐做法!!!
但是,我这里,自己在kafka安装目录下,为了自己的方便,写了个startkafka.sh和startzookeeper.sh
nohup bin/kafka-server-start.sh config/server.properties > kafka.log 2>&1 &
nohup bin/zookeeper-server-start.sh config/zookeeper.properties > zookeeper.log 2>&1 &
注意还要,root用户来,附上执行权限。chmod +x ./startkafka.sh chmod +x ./startzookeeper.sh 
这样,就会在kafka安装目录下,对应生出kafka.log和zookeeper.log。

1、[spark@sparksinglenode kafka_2.10-0.8.1.1]$ jps
5098 Jps
2、[spark@sparksinglenode kafka_2.10-0.8.1.1]$ bash startzookeeper.sh
[spark@sparksinglenode kafka_2.10-0.8.1.1]$ jps
5125 Jps
5109 QuorumPeerMain
3、[spark@sparksinglenode kafka_2.10-0.8.1.1]$ bash startkafka.sh
[spark@sparksinglenode kafka_2.10-0.8.1.1]$ jps
5155 Jps
5140 Kafka
5109 QuorumPeerMain
[spark@sparksinglenode kafka_2.10-0.8.1.1]$

  我了个去,启动是多么方便!

  

kafka_2.10-0.8.1.1.tgz的3节点集群

  关于下载,和安装,解压,这些,我不多赘述了。见我的单节点博客。

root@SparkMaster:/usr/local/kafka/kafka_2.10-0.8.1.1/config# cat server.properties 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# see kafka.server.KafkaConfig for additional details and defaults

############################# Server Basics #############################

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0

############################# Socket Server Settings #############################

# The port the socket server listens on
port=9092

# Hostname the broker will bind to. If not set, the server will bind to all interfaces
#host.name=localhost

# Hostname the broker will advertise to producers and consumers. If not set, it uses the
# value for "host.name" if configured. Otherwise, it will use the value returned from
# java.net.InetAddress.getCanonicalHostName().
#advertised.host.name=<hostname routable by clients>

# The port to publish to ZooKeeper for clients to use. If this is not set,
# it will publish the same port that the broker binds to.
#advertised.port=<port accessible by clients>

# The number of threads handling network requests
num.network.threads=2

# The number of threads doing disk I/O
num.io.threads=8

# The send buffer (SO_SNDBUF) used by the socket server
socket.send.buffer.bytes=1048576

# The receive buffer (SO_RCVBUF) used by the socket server
socket.receive.buffer.bytes=1048576

# The maximum size of a request that the socket server will accept (protection against OOM)
socket.request.max.bytes=104857600

############################# Log Basics #############################

# A comma seperated list of directories under which to store log files
log.dirs=/kafka-logs

# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
num.partitions=2

############################# Log Flush Policy #############################

# Messages are immediately written to the filesystem but by default we only fsync() to sync
# the OS cache lazily. The following configurations control the flush of data to disk. 
# There are a few important trade-offs here:
# 1. Durability: Unflushed data may be lost if you are not using replication.
# 2. Latency: Very large flush intervals may lead to latency spikes when the flush does occur as there will be a lot of data to flush.
# 3. Throughput: The flush is generally the most expensive operation, and a small flush interval may lead to exceessive seeks. 
# The settings below allow one to configure the flush policy to flush data after a period of time or
# every N messages (or both). This can be done globally and overridden on a per-topic basis.

# The number of messages to accept before forcing a flush of data to disk
#log.flush.interval.messages=10000

# The maximum amount of time a message can sit in a log before we force a flush
#log.flush.interval.ms=1000

############################# Log Retention Policy #############################

# The following configurations control the disposal of log segments. The policy can
# be set to delete segments after a period of time, or after a given size has accumulated.
# A segment will be deleted whenever *either* of these criteria are met. Deletion always happens
# from the end of the log.

# The minimum age of a log file to be eligible for deletion
log.retention.hours=168

# A size-based retention policy for logs. Segments are pruned from the log as long as the remaining
# segments don't drop below log.retention.bytes.
#log.retention.bytes=1073741824

# The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=536870912

# The interval at which log segments are checked to see if they can be deleted according 
# to the retention policies
log.retention.check.interval.ms=60000

# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
log.cleaner.enable=false

############################# Zookeeper #############################

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
zookeeper.connect=SparkMaster:2181,SparkWorker1:2181,SparkWorker2:2181

# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=1000000
root@SparkMaster:/usr/local/kafka/kafka_2.10-0.8.1.1/config#

  SparkWorker1和SparkWorker2分别只把 broker.id=0改成 broker.id=1 ,broker.id=2。

即SparkMaster:

  broker.id=0

  log.dirs=/kafka-logs

  zookeeper.connect=SparkMaster:2181,SparkWorker1:2181,SparkWorker2:2181

即SparkWorker1:

  broker.id=1

  log.dirs=/kafka-logs

  zookeeper.connect=SparkMaster:2181,SparkWorker1:2181,SparkWorker2:2181

即SparkWorker2:

  broker.id=2

  log.dirs=/kafka-logs

  zookeeper.connect=SparkMaster:2181,SparkWorker1:2181,SparkWorker2:2181

 

   kafka的3节点如何启动

  步骤一:先,分别在SparkMaster、SpakrWorker1、SparkWorker2节点上,启动zookeeper进程。

root@SparkMaster:/usr/local/kafka/kafka_2.10-0.8.1.1# bash startkafka.sh

  其他,两台机器,一样的,不多赘述。

本文转自大数据躺过的坑博客园博客,原文链接:http://www.cnblogs.com/zlslch/p/6073192.html,如需转载请自行联系原作者

kafka_2.10-0.8.1.1.tgz的1或3节点集群的下载、安装和配置(图文详细教程)绝对干货...相关推荐

  1. mysql8.0安装及配置超详细教程_系统城教你mysql8.0安装与配置教程

    一.下载mysql 安装mysql有两种方式,一种是下载安装包安装,另一种是下载压缩包解压配置,这里使用安装包方式. 进去后点击下面的Download 点击No thinks进入下载 二.安装mysq ...

  2. Mysql8.0下载安装与配置保姆级教程 (MacOS版本)

    目录 一.下载 二.安装MySQL 1.Use Legacy Password Encryption 2.密码设置8位 3.安装成功 三. 数据库配置连接 1.配置与生效 打开文件 加入语句 使配置的 ...

  3. MySQL8.0.22安装及配置(超详细)

    MySQL8.0.22安装及配置(超详细) 大家好,今天我们来学习一下 MySQL8.0.22安装及配置,好好看,好好学,超详细的 第一步 进入MySQL官网下载,如下图所示: 第二步 进入下载完成后 ...

  4. 超级账本Fabric 1.0多节点集群的部署(2)

    上期文章阐述了超级账本 Fabric 1.0多节点部署的方法概述,得到广大读者的关注,笔者们连夜赶工,今天发布连载之二,介绍具体搭建 Fabric 1.0 集群的步骤. 注:部署过程中大量使用了doc ...

  5. 【VMware vSAN 7.0】6.6 使用快速入门功能配置延伸集群或双节点集群—我们有软硬件解决方案

    目录 1. vSAN简介 1.1 vSAN 概念 1.1.1 vSAN 的特性 1.2 vSAN术语和定义 1.3 vSAN 和传统存储 1.4 构建 vSAN 群集 1.5 vSAN 部署选项 1. ...

  6. 旧版3.1.0版本文章内有新版独立微信社群人脉系统社群空间站最新源码开源+详细教程

    介绍: 3.1.0版本独立微信社群人脉系统社群空间站最新源码开源+详细教程 刚想到3.1.0版本的还没有分享只分享了3.1.1版本和2.8.2版本的现在把3.1.0版本的也分享出来比较完善 功能各有各 ...

  7. 【VMware vSAN 7.0】6.13 将双节点集群分配给共享见证主机—我们有软硬件解决方案

    目录 1. vSAN简介 1.1 vSAN 概念 1.1.1 vSAN 的特性 1.2 vSAN术语和定义 1.3 vSAN 和传统存储 1.4 构建 vSAN 群集 1.5 vSAN 部署选项 1. ...

  8. Redis 多机多节点集群搭建方案(5.0版本)

    >搭建环境: a)redis的安装包,redis-5.0.8.tar.gz b)gcc安装包gcc_rpm.tar.gz c)VM10 d)CentOS镜像文件 >搭建步骤: 1.准备工作 ...

  9. [刷机交流]谷歌Pixel 2手机刷入官方安卓10工厂镜像图文详细教程

    一.下载Pixel 2安卓10工厂镜像刷机包     工厂镜像刷机包下载官方地址如下: https://dl.google.com/dl/android/aosp/walleye-qq3a.20080 ...

最新文章

  1. 【Pandas库】(6) 索引操作--改、查、高级索引
  2. 警方:“外卖员因获差评杀人”为假消息 造谣者被刑拘
  3. NeHe OpenGL第二十八课:贝塞尔曲面
  4. Redis集群方案,Codis安装测试
  5. java this$0_java中this$0的含义及用法
  6. 目标检测技术演化:从R-CNN到Faster R-CNN
  7. axios的数据拦截(拦截器)
  8. [转帖] 启动多个Tomcat 需要修改的端口
  9. 使用IntelliJ IDEA开发Spring MVC HelloWorld
  10. 交错数组(jagged array)
  11. Ubuntu 8.04和Windows Server 2008 双体系的安置与卸载记
  12. HDU 2549 壮志难酬
  13. 软件测试优秀员工发言稿,2018软件测试国赛获奖感言|2018年优秀员工获奖感言
  14. 数组取交集、并集与补集
  15. 润乾报表 echarts统计图分类显示不全
  16. 大数据分析与应用技术创新平台
  17. 哔哩哔哩mac电脑版上线,来聊聊B站Mac版客户端初体验
  18. php中subtr()函数的使用方法
  19. 自制小四轴:从入门到放弃
  20. Errors报错记录

热门文章

  1. 20211102:数字滤波器按照实现结构的分类及其优缺点总结
  2. html增删改查按钮控件,HTML DOM节点的增删改查
  3. python远程同步文件_Python实现的远程文件自动打包并下载功能示例
  4. xgboost算法_xgboost算法过程推导
  5. python求平均工资_python如何求列表平均值?
  6. VB 更换设置桌面背景图片函数
  7. VB 去除文本框粘贴功能
  8. Linux文本文件与Windows下的格式转换
  9. 恋爱必经阶段,过不来就分了
  10. 马斯克辞任董事长,罚款2000万美元,钢铁侠一夜服软