“Kafka:安装、配置”的版本间差异
跳到导航
跳到搜索
(建立内容为“category:Kafka == 关于 == Kafka 解压即用,并没有繁琐的安装步骤,唯一注意的是其需要 Zookeeper 支持(但其自带有 Zookeeper)…”的新页面) |
(→关于) |
||
第10行: | 第10行: | ||
$ cd opt/ | $ cd opt/ | ||
$ tar -zxf kafka_2.11.0.9.0.0 tar.gz | $ tar -zxf kafka_2.11.0.9.0.0 tar.gz | ||
</syntaxhighlight> | </syntaxhighlight> | ||
# 启动服务器: | # 启动服务器: | ||
#: <syntaxhighlight lang="bash" highlight=""> | #: <syntaxhighlight lang="bash" highlight=""> | ||
$ cd kafka_2.11.0.9.0.0 | |||
$ bin/kafka-server-start.sh config/server.properties | $ bin/kafka-server-start.sh config/server.properties | ||
</syntaxhighlight> | </syntaxhighlight> | ||
第36行: | 第36行: | ||
NOTE: | NOTE: | ||
* 启动 kafka 需要执行 kafka-server-start.bat 文件,需要传入一个路径参数(server.config 文件的路径): | * 启动 kafka 需要执行 kafka-server-start.bat 文件,需要传入一个路径参数(server.config 文件的路径): | ||
*# 如果使用自行安装的 Zookeeper(先启动 Zookeeper,再启动 | *# 如果使用自行安装的 Zookeeper(先启动 Zookeeper,再启动 Kafka),使用“config/server.properties”。 | ||
*# 如果使用 Kafka 自带的 Zookeeper(直接启动 Kafka | *# 如果使用 Kafka 自带的 Zookeeper(直接启动 Kafka 即可),使用:“config/zookeeper.properties”。 | ||
*: properties 文件都位于“../kafka_x.xx.x.x.x.x/config”中。 |
2021年5月18日 (二) 00:27的版本
关于
Kafka 解压即用,并没有繁琐的安装步骤,唯一注意的是其需要 Zookeeper 支持(但其自带有 Zookeeper)。
- 官网下载压缩包:https://www.apache.org/dyn/closer.cgi?path=/kafka/0.9.0.0/kafka_2.11-0.9.0.0.tgz
- 提取 tar 文件:
$ cd opt/ $ tar -zxf kafka_2.11.0.9.0.0 tar.gz
- 启动服务器:
$ cd kafka_2.11.0.9.0.0 $ bin/kafka-server-start.sh config/server.properties
- 服务器启动后,会得到以下响应:
$ bin/kafka-server-start.sh config/server.properties [2016-01-02 15:37:30,410] INFO KafkaConfig values: request.timeout.ms = 30000 log.roll.hours = 168 inter.broker.protocol.version = 0.9.0.X log.preallocate = false security.inter.broker.protocol = PLAINTEXT ……………………………………………. …………………………………………….
- 停止服务器:
$ bin/kafka-server-stop.sh config/server.properties
NOTE:
- 启动 kafka 需要执行 kafka-server-start.bat 文件,需要传入一个路径参数(server.config 文件的路径):
- 如果使用自行安装的 Zookeeper(先启动 Zookeeper,再启动 Kafka),使用“config/server.properties”。
- 如果使用 Kafka 自带的 Zookeeper(直接启动 Kafka 即可),使用:“config/zookeeper.properties”。
- properties 文件都位于“../kafka_x.xx.x.x.x.x/config”中。