首先下载zookeeper
修改config/zoo.cfg,在zookeeper目录下创建data和log目录,修改dataDir和dataLogDir路径
# 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=E:\zookeeper-3.4.10\data
dataLogDir=E:\zookeeper-3.4.10\log
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
双击zkServer启动
下载kafka,修改kafka_2.13-2.8.0\config\server.properties配置
broker.id=0
listeners=PLAINTEXT://:9092
log.dirs=E:\kafka_2.13-2.8.0\log
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1
进入kafka_2.13-2.8.0\bin\windows目录,右键打开PowerShell,输入命令
.\kafka-server-start.bat ..\..\config\server.properties
Kafka默认连接暴露端口:9092