mac通过brew安装kafka
1、brew install kafka (可指定版本号)
如果卡在brew Updating 可Ctrl+c,1秒后就会开始下载安装kafka
2、kafka安装路径:
/usr/local/Cellar/kafka/2.0.0
3、配置文件路径:
/usr/local/etc/kafka/server.properties
/usr/local/etc/kafka/zookeeper.properties
4、启动服务:
(1)启动zookeeper服务(运行kafka需要使用Zookeeper,所以你需要先启动Zookeeper,如果你没有Zookeeper,你可以使用kafka自带打包和配置好的Zookeeper。)
cd /usr/local/Cellar/kafka/2.3.0/bin
./zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties &
(2)启动kafka服务
cd /usr/local/Cellar/kafka/2.3.0/bin
./kafka-server-start /usr/local/etc/kafka/server.properties &