This project for helping install kafka and Zookeeper for my classmates :D
Open terminal and run this command.
curl https://raw.githubusercontent.com/P3TCH/kafka-install-helper/main/mac_installer.sh -o ~/mac_kafka_installer.sh && bash ~/mac_kafka_installer.sh
โ If error, try to uninstall and try again. Uninstall brew command โ
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Open terminal and run this command.
sudo apt update && sudo apt install -y curl wget && curl https://raw.githubusercontent.com/P3TCH/kafka-install-helper/main/ubuntu_installer.sh -o ~/ubuntu_kafka_installer.sh && bash ~/ubuntu_kafka_installer.sh
Open Powershell and run this command.
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop update
scoop bucket add java
scoop install openjdk17
scoop install kafka
scoop install zookeeper
brew services start zookeeper
brew services start kafka
brew services stop zookeeper
brew services stop kafka
brew services list
sudo systemctl start zookeeper
sudo systemctl start kafka
sudo systemctl stop zookeeper
sudo systemctl stop kafka
sudo systemctl status zookeeper
sudo systemctl stop kafka
Open new Powershell
1.Go to zookeeper location ( version Enter the version you have installed.)
cd ~\scoop\apps\zookeeper\3.8.1\bin
2.Run zookeeper service
.\zkServer.cmd
Open new Powershell
1.Go to kafka location ( version Enter the version you have installed.)
cd ~\scoop\apps\kafka\3.4.0\bin\windows
2.Run kafka service
.\kafka-server-start.bat ~\scoop\apps\kafka\3.4.0\config\server.properties
FOR WINDOWS YOU CAN EDIT KAFKA SETTING IN PATH
~\scoop\apps\kafka\3.4.0\config\server.properties
Open new Powershell
1.Go to kafka location ( version Enter the version you have installed.)
cd ~\scoop\apps\kafka\3.4.0\bin\windows
RUN ANY COMMAND WITH .bat
#Example
.\kafka-topics.bat --create --topic sports_news --bootstrap-server localhost:9092
*Can use this command to run (Added path :D)
kafka-topics
kafka-console-producer
kafka-console-consumer
#sports_news is example name
kafka-topics --create --topic sportsnews --bootstrap-server localhost:9092
kafka-topics --list --topic sportsnews --bootstrap-server localhost:9092
kafka-topics --describe --topic sportsnews --bootstrap-server localhost:9092
kafka-console-producer --topic sportsnews --bootstrap-server localhost:9092
kafka-console-consumer --topic sportsnews --bootstrap-server localhost:9092