欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

Kafka学习day01,

来源: javaer 分享于  点击 11887 次 点评:186

Kafka学习day01,


Kafka Centos7环境搭建

1. 安装Zookeeper

1.1 官网下载安装包

ZooKeeper官网下载地址

1.2 使用Xftp或远程工具将ZooKeeper安装包上传文件到服务器或虚拟机

1.3 编写配置文件

进入ZooKeeper安装目录

cd {安装目录}/conf/
1.3.1 配置文件模版
# 使用Vim编辑
vim 
# 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=/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
admin.serverPort=8084 # 8080端口占用可修改
1.3.2 启动命令
# 进入bin目录
cd {安装目录}/bin
# 启动
./zkServer.sh start
1.3.3 测试是否安装成功
# 进入bin目录
cd {安装目录}/bin
# 启动测试
./zkCli.sh

测试成功截图

2. 官网下载最新kafka包

Kafka官网下载地址

3. 使用Xftp或远程工具将Kafka安装包上传文件到服务器或虚拟机


4. 启动Kafka

# 进入安装目录
cd 安装目录
# 启动kafka
./bin/kafka-server-start.sh {安装目录}/config/server.properties
相关栏目:

用户点评