在Linux环境下部署confluent platform

本文详细介绍了如何在Linux环境下部署Confluent Platform,包括安装JDK、配置主机名与IP映射、独立安装Zookeeper、下载与配置Confluent Platform,以及启动和测试过程。
摘要由CSDN通过智能技术生成
1. confluent platform的简单介绍:

confluent platform是一个可靠、高性能的流平台,提供组织和管理来自不同数据源数据的功能。(这个说法太正式,反正我是简单粗暴地把它当成kafka和一些扩展kafka功能的一套组件~)

2. confluent platform的部署流程:

废话不多说,直接开搞~

(1) 安装JDK(建议安装1.8的)

这个很简单,就跳过吧,不会的请自行度娘~

(2) 配置主机名和ip的映射(zookeeper的主机之间是使用主机名相互通信的)
vim /etc/hosts
192.168.20.240     host240
192.168.20.239     host239
192.168.20.238     host238

(ps: zookeeper至少需要三台机子,然后改hosts需要root权限~)

(3) 安装zookeeper

虽然confluent platform自带一个,但是还是推荐自己装一个更高版本的~

a. 下载

zookeeper

b. 解压后进入目录
tar -zxf zookeeper-3.4.11.tar.gz
cd zookeeper-3.4.11
c. 添加配置文件

复制一份conf/zoo_sample.cfg,命名为zoo.cfg

cp conf/zoo_sample.cfg conf/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.
#zookeeper数据目录
dataDir=/data/zookeeper
# 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.x中的x是下面myid需要的
server.240=host240:2888:3888
server.239=host239:2888:3888
server.238=host238:2888:3888

(ps:这个配置每台机子都一样~)

d. 添加myid文件

在上一步配置的zookeeper数据目录下新建文件myid,加入上一步对应配置的x(比如host240对应配置的是240)

cat /data/zookeeper/myid
240
e. 启动zookeeper

分别在三台主机上启动

bin/zkServer.sh start
(4) confluent platform安装
a. 下载

https://www.confluent.io/download/

(ps: 选择下载开源版本,邮件可以乱填,只要能通过邮件的正则校验即可,不用登陆邮件确认~)

b. 解压后进入目录
tar -zxf confluent-oss-4.0.0
  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值