Kafka学习day01
Kafka Centos7环境搭建1. 安装Zookeeper
1.1 官网下载安装包
ZooKeeper官网下载地址
https://mygithubcdn.educatedtest.eu.org/gh/mycodeoen/MyPicture@main/blog/202411142214781.png
1.2 使用Xftp或长途工具将ZooKeeper安装包上传文件到服务器或假造机
https://mygithubcdn.educatedtest.eu.org/gh/mycodeoen/MyPicture@main/blog/202411142214223.png
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 start1.3.3 测试是否安装乐成
# 进入bin目录
cd {安装目录}/bin
# 启动测试
./zkCli.sh测试乐成截图
https://mygithubcdn.educatedtest.eu.org/gh/mycodeoen/MyPicture@main/blog/202411142214088.png
2. 官网下载最新kafka包
Kafka官网下载地址
https://mygithubcdn.educatedtest.eu.org/gh/mycodeoen/MyPicture@main/blog/202411142214584.png
3. 使用Xftp或长途工具将Kafka安装包上传文件到服务器或假造机
https://mygithubcdn.educatedtest.eu.org/gh/mycodeoen/MyPicture@main/blog/202411142215599.png
4. 启动Kafka
# 进入安装目录
cd 安装目录
# 启动kafka
./bin/kafka-server-start.sh {安装目录}/config/server.properties
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]