Environmental requirements: Three installed Centos6.4 virtual machine, need to have java1.7 above environment, need zookeeper environment.
1) Download Kafka installation package from Kafka website
Download Kafka
2) Unpack the installation package
3) Since the name is too long, change to Kafka:
MV kafka_2.10-0.9.0.1 Kafka
4) Enter the Config directory below Kafka and modify the configuration file Server.properties:
port=9092log.dirs=/usr/local/kafka/logszookeeper.connect=master:2181,slave1:2181,slave2:2181
5) Remote replication to other nodes
Scp-r/usr/local/kafka [email protected]:/usr/local/-r/usr/local/kafka [email protected]:/usr/local/
6) Start the Kafka service on each node in the background
Nohup./bin/kafka-server-start.sh config/server.properties >/usr/local/kafka/logs/kafka-zk.log 2>&1 &
7) Start complete, Oh!
The cluster construction of Kafka in Centos6.4