Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux installed and tested the deployment of Kafka distributed cluster     - Swift notes - let you two hours to learn Swift (Programming)

- How ONLYOFFICE collaborative editing document on Linux (Linux)

- Use Visual Studio 2015 to develop Android program (Programming)

- Red-black tree in C ++ (Programming)

- Linux Powerful IDE - Geany configuration instructions (Linux)

- MySQL database under Linux to achieve automatic backup scheduled backup day (Database)

- RMAN parameters of ARCHIVELOG DELETION (Database)

- CentOS 6.4 Python 2.6 upgrade to 2.7 (Linux)

- An Example of GoldenGate Extract Process Hang Problem Solving (Database)

- Upgrade Goldengate 11.1.1.1.2 to 11.2.1.0.1 (Database)

- How nodeclub constructed Docker image (Server)

- CentOS 6.5 can not connect to the network under VMware (Linux)

- Linux Getting Started tutorial: Borrow Windows fonts in Ubuntu 14.10 (Linux)

- Install VMware Tools in Debian (Linux)

- Use Ganglia to monitor your cluster (Server)

- Oracle create a temporary table space group (Database)

- Oracle 10g in the unique and index problems (Database)

- Iptables principle (Linux)

- Linux system security settings (Linux)

- Achieve camera preview by ffplay (Linux)

 
         
  Linux installed and tested the deployment of Kafka distributed cluster
     
  Add Date : 2017-08-31      
         
       
         
  Note: The first JAVA deployment environment before deploying Kafka, Zookeeper

Prepare three CentOS_6.5_x64 server are:
IP: 192.168.0.249 dbTest249 Kafka
IP: 192.168.0.250 Other250 Kafka
IP: 192.168.0.251 webTest251 Kafka
First, install Kafka

# Tar zxvf kafka_2.9.1-0.8.2.2.tgz -C / usr / local /
# Cd /usr/local/kafka_2.9.1-0.8.2.2/
Second, we installed three broker, respectively, in the three machines: dbTest249, Other250, webTest251:
1, edit dbTest249:

# Vim config / server.properties
1 broker.id = 0
2 port = 9092
3 host.name = dbTest249
4 advertised.host.name = dbTest249
5 num.partitions = 2
6 zookeeper.connect = dbTest249: 2181, Other250: 2181, webTest251: 2181
2, edit Other250

# Vim config / server.properties
1 broker.id = 1
2 port = 9092
3 host.name = Other250
4 advertised.host.name = Other250
5 num.partitions = 2
6 zookeeper.connect = dbTest249: 2181, Other250: 2181, webTest251: 2181
3, edit webTest251

# Vim config / server.properties
1 broker.id = 2
2 port = 9092
3 host.name = webTest251
4 advertised.host.name = webTest251
5 num.partitions = 2
6 zookeeper.connect = dbTest249: 2181, Other250: 2181, webTest251: 2181
Third, start Kafka services, respectively, in the three machines: dbTest249, Other250, webTest251:

# Nohup /usr/local/kafka_2.9.1-0.8.2.2/bin/kafka-server-start.sh /usr/local/kafka_2.9.1-0.8.2.2/config/server.properties> / var / log / kafka. log 2> & 1 &
# Ps -ef | grep kafka
# Netstat -tunpl | grep java
Fourth, the test

1 on dbTest249, a new TOPIC (replication-factor = num of brokers)

# /usr/local/kafka_2.9.1-0.8.2.2/bin/kafka-topics.sh --create --topic Test --replication-factor 3 --partitions 2 --zookeeper dbTest249: 2181
 

2, we Other250, open a terminal, sends a message to kafka (Other250 analog producer)

# /usr/local/kafka_2.9.1-0.8.2.2/bin/kafka-console-producer.sh --broker-List dbTest249: 9092 --sync --topic test
In the transmitting terminal sends a message: Hello Kafka

 

3. us on webTest251, open a terminal, the message consumer (webTest251 analog consumer)

# /usr/local/kafka_2.9.1-0.8.2.2/bin/kafka-console-consumer.sh --zookeeper DbTest249: 2181 --topic test --from-beginning
Terminal in the consumer message is displayed: Hello Kafka
     
         
       
         
  More:      
 
- Linux, grep, sed usage (Linux)
- HttpClient Tutorial (Programming)
- SSH service configuration to use a certificate login Linux server (Server)
- 10 tips daily Docker (Server)
- Jump table (skiplist) of code (Programming)
- JavaScript function closures Quick Start (Programming)
- PPA on Ubuntu Linux installation Plank 0.8.0 (Linux)
- CentOS / RedHat system partition essential requirements and partition scheme (Linux)
- Print Linux system error codes (Linux)
- Kubernetes (k8s) environment to build combat (Server)
- 20 Top Linux commands (Linux)
- Let VMware ESXi virtual switch support VLAN (Linux)
- xCAT Installation Kit (Linux)
- Notebook computer forget password solution (Linux)
- JavaScript prototype and prototype chain and project combat (Programming)
- Linux (Ubuntu) How iptables port mapping (Server)
- Configuration OpenOCD + FT2232 under Ubuntu (Linux)
- Hibernate Search 5.5 in the search results sorted (Linux)
- Use Nginx as a load balancer (Server)
- Workspace Go language and environment variables GOPATH (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.