반응형
1. kafka 파일 다운로드
https://kafka.apache.org/quickstart
Apache Kafka
Apache Kafka: A Distributed Streaming Platform.
kafka.apache.org
2. 카프카 바이너리 압축 풀기
tar -xzf kafka_2.13-3.9.0.tgz
mv kafka_2.13-3.9.0 ~/
cd ~/kafka_2.13-3.9.0
export PATH=$PATH:~/kafka_2.13-3.9.0/bin
3. 주키퍼 서버 시작하기
cd ~/kafka_2.13-3.9.0
bin/zookeeper-server-start.sh config/zookeeper.properties
4. 수동으로 클러스터 생성 및 구성
cd ~/kafka_2.13-3.9.0
cp config/server.properties config/server0.properties
cp config/server.properties config/server1.properties
cp config/server.properties config/server2.properties
5. 서버 구성
vi config/server0.properties
broker.id=0
listeners=PLAINTEXT://localhost:9092
log.dirs= /tmp/kafka-logs-0
vi config/server0.properties
broker.id=1
listeners=PLAINTEXT://localhost:9093
log.dirs= /tmp/kafka-logs-1
vi config/server0.properties
broker.id=2
listeners=PLAINTEXT://localhost:9094
log.dirs= /tmp/kafka-logs-2
6. 카프카 시작하기
cd ~/kafka_2.13-3.9.0
bin/kafka-server-start.sh config/server0.properties
bin/kafka-server-start.sh config/server1.properties
bin/kafka-server-start.sh config/server2.properties
Running a Multi-Broker Apache Kafka 0.8 Cluster on a Single Node
In this article I describe how to install, configure and run a multi-broker Apache Kafka 0.8 (trunk) cluster on a single machine. The final setup consists of one local ZooKeeper instance and three local Kafka brokers. We will test-drive the setup by sendin
www.michael-noll.com
반응형
'개발 > kafka' 카테고리의 다른 글
[kafka] 소비자 그룹 (Consumer Group) (0) | 2025.01.05 |
---|---|
[kafka] log compaction | log tail | log head (1) | 2025.01.04 |
[kafka] producer message key = 메시지 코디네이트(Message Coordinate) (1) | 2025.01.04 |
[kafka] Kafka Connect High-Level Overview + Cluster and Distributed Architecture (1) | 2025.01.03 |
[kafka] 토픽 생성 및 리스트 확인 + producer, consumer 메시지 전달 (mac m1) (0) | 2024.12.14 |