Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Linux installed and tested the deployment of Kafka distributed cluster     - Shell array: Define Shell array, the array length (Programming)

- Use install_updates upgrade GAMIT / GLOBK (Linux)

- Oracle Linux 5.5 (64bit) Install Oracle 11gR2 RAC detailed tutorial (Database)

- To install Internet security firewall Raiders (Linux)

- Merge sort Java implementation (Programming)

- Windows 7 hard disk to install Ubuntu 14.10 (Linux)

- Linux System Getting Started Tutorial: Five image processing software (Linux)

- Linux use chattr and lsattr commands to manage file and directory attributes (Linux)

- Linux system security configuration (Linux)

- How to Install Suricata IDS on a Linux system (Server)

- To setup CentOS LAMP environment (Server)

- To disable the function by pressing Ctrl-Alt-Del to restart the system in RHEL / CentOS 5/6 (Linux)

- Setting CentOS firewall open port (Linux)

- vector C ++ sequence containers (Programming)

- An example of troubleshooting of embedded Linux OpenWRT (Linux)

- Manually generate AWR reports (Database)

- Linux kernel IPv6 protocol closed manner (Linux)

- Git 2.5 increase in the working tree, triangle improved workflow performance (Linux)

- JavaScript function closures Quick Start (Programming)

- grub boot error resolution examples (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:      
 
- Puppet Detailed centralized configuration management system (Server)
- Linux three ways to set environment variables (Linux)
- Hibernate + JUnit test entity class generate database table (Programming)
- Python objects (Programming)
- How to Start a Linux application running in the background using the terminal mode (Linux)
- VMware Workstation virtual machine Ubuntu achieve shared with the host (Linux)
- KVM installation under CentOS 5.5 (Linux)
- Ubuntu Server (Ubuntu 14.04 LTS 64-bit) installation libgdiplus 2.10.9 error solution (Linux)
- Ubuntu system grub repair method (Linux)
- How to build Mono 3.4.0 / 3.4.1 on Windows (Linux)
- How to extend / remove swap partitions (Linux)
- Linux directory structure (Linux)
- ActiveMQ configuration Getting Started Tutorial (Server)
- How to configure a server in a MySQL Cluster (Database)
- Installation on the way to the root source Ubuntu Server 14.04 LTS version Odoo8.0 (Server)
- Create several practical points of high security PHP site (Linux)
- FileZilla FTP && TLS connection settings of (Linux)
- Hibernate in profile (Database)
- Ubuntu simple method to track multiple time zones (Linux)
- JavaScript basic types and type conversion (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.