KafKa安装使用手册

KafKa安装:

kafka下载地址:http://kafka.apache.org/downloads.html

解压命令:tar zxvf kafka_2.10-0.9.0.1.tgz -C /usr/local

改名命令:mv kafka_2.10-0.9.0.1/ kafka

进入解压后的目录,修改server.properties文件:

vim /usr/local/kafka/config/server.properties

修改内容:

broker.id=0

port=9092

host.name=192.168.1.114

advertised.host.name=192.168.1.114

log.dirs=/usr/local/kafka/kafka-logs

num.partitions=2

zookeeper.connect=192.168.1.114:2181,192.168.1.115:2181,192.168.1.116:2181

建立日志文件夹:mkdir /usr/local/kafka/kafka-logs

启动kafka:/usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties &

KafKaManager安装:

第一步:下载kafka-manager-1.0-SNAPSHOT.zip

解压:unzip kafka-manager-1.0-SNAPSHOT.zip -d /usr/local/

改名:mv kafka-manager-1.0-SNAPSHOT/ kafka-manager-1.0

编辑文件:vim /usr/local/kafka-manager-1.0/conf/application.conf

修改内容

kafka-manager.zkhosts="192.168.1.114:2181,192.168.1.115:2181,192.168.1.116:2181"

启动kafka-manager:

nohup /usr/local/kafka-manager-1.0/bin/kafka-manager -Dconfig.file=/usr/local/kafka-manager-1.0/conf/application.conf >/dev/null 2>&1 &

默认端口为:9000

你可能感兴趣的:(中间件,Linux,kafka,分布式)