Git Product home page Git Product logo

kafka-install-helper's Introduction

Kafka and Zookeeper install helper

This project for helping install kafka and Zookeeper for my classmates :D

visitor badge

How to install

MacOS

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)"

Ubuntu

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

Windows

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

How to start, stop Kafka and Zookeeper services

MacOS

Start

brew services start zookeeper
brew services start kafka

Stop

brew services stop zookeeper
brew services stop kafka

Check is running

brew services list

Ubuntu

Start

sudo systemctl start zookeeper
sudo systemctl start kafka

Stop

sudo systemctl stop zookeeper
sudo systemctl stop kafka

Check is running

sudo systemctl status zookeeper
sudo systemctl stop kafka

Windows

Start zookeeper on windows

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

Start kafka on windows

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

Run kafka command on windows

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

Command to use kafka (Windows not include)

*Can use this command to run (Added path :D)

kafka-topics
kafka-console-producer
kafka-console-consumer

Example command

#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

kafka-install-helper's People

Contributors

p3tch avatar sither89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Putter avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

sither89

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.