Kafka Centos7环境搭建
1. 安装Zookeeper
1.1 官网下载安装包
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包
3. 使用Xftp或远程工具将Kafka安装包上传文件到服务器或虚拟机
4. 启动Kafka
# 进入安装目录
cd 安装目录
# 启动kafka
./bin/kafka-server-start.sh {安装目录}/config/server.properties
标签:bin,1.3,day01,Kafka,学习,cd,安装,目录
From: https://www.cnblogs.com/zpcblogs/p/18546954