2013年12月4日 星期三

[研究] Apache Kafka 0.8 分散式訊息系統安裝 (CentOS 6.4 x64)

[研究] Apache Kafka 0.8 分散式訊息系統安裝 (CentOS 6.4 x64)

2013-12-04

Apache Kafka 為一個分散式訊息系統。

官方網站
http://kafka.apache.org/

安裝

cd   /usr/local
wget   https://dist.apache.org/repos/dist/release/kafka/0.8.0/kafka_2.8.0-0.8.0.tar.gz
tar   zxf   kafka_2.8.0-0.8.0.tar.gz

啟動

[root@localhost local]# /usr/local/kafka_2.8.0-0.8.0/bin/kafka-server-start.sh   /usr/local/kafka_2.8.0-0.8.0/config/server.properties  &

驗證

[root@localhost local]# ps aux | grep kafka
root     28092  8.4  9.7 2040568 99176 pts/1   Sl   21:50   0:01 java -Xmx1G -Xms1G -server -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:+DisableExplicitGC -Djava.awt.headless=true -Xloggc:/usr/local/kafka_2.8.0-0.8.0/bin/../logs/kafkaServer-gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dlog4j.configuration=file:/usr/local/kafka_2.8.0-0.8.0/bin/../config/log4j.properties -cp :/usr/local/kafka_2.8.0-0.8.0/bin/../core/target/scala-2.8.0/*.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../perf/target/scala-2.8.0/kafka*.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/jopt-simple-3.2.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/log4j-1.2.15.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/metrics-annotation-2.2.0.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/metrics-core-2.2.0.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/scala-compiler.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/scala-library.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/slf4j-api-1.7.2.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/slf4j-simple-1.6.4.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/snappy-java-1.0.4.1.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/zkclient-0.3.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../libs/zookeeper-3.3.4.jar:/usr/local/kafka_2.8.0-0.8.0/bin/../kafka_2.8.0-0.8.0.jar kafka.Kafka /usr/local/kafka_2.8.0-0.8.0/config/server.properties
root     28126  0.0  0.0 103244   840 pts/1    S+   21:50   0:00 grep kafka

設定檔

config/server.properties 中比較重要的參數是 broker.id、host.name、ZooKeeper伺服器位置等。

(完)

沒有留言:

張貼留言