python-kafka入门

1.安装kafka服务器

官网:http://kafka.apache.org进行下载最新版本

2.官网快速开始教程:http://kafka.apache.org/quickstart

Step 1: Download the code

tar -xzf kafka_2.11-2.1.0.tgz

cd kafka_2.11-2.1.0

Step 2: Start the server

start a ZooKeeper server:

bin/zookeeper-server-start.sh config/zookeeper.properties

也可以:bin/zookeeper-server-start.sh config/zookeeper.properties &

如果此步提示:306行java找不到,则按照提示安装jre即可.

start the Kafka server:

bin/kafka-server-start.sh config/server.properties

也可以:bin/kafka-server-start.sh config/server.properties &

第三步以后不操作

3.python 安装kafka-python客户端用于操作kafka服务器

官网:https://github.com/dpkp/kafka-python

猜你喜欢

转载自blog.csdn.net/zhu6201976/article/details/86503520
今日推荐