Centos7安装Zookeeper和Kafka

 

 注释:在启动zookeeper和kafka中添加 -daemon 代表永久启动

 

1、下载Zookeeper和Kafka

wget http://apache.fayea.com/kafka/0.10.2.2/kafka_2.12-0.10.2.2.tgz  
wget https://archive.apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz

2、创建文件夹

mkdir -p /usr/local/services/zookeeper
mkdir -p /usr/local/services/kafka

3、将压缩包移动到对应的文件夹

mv kafka_2.12-0.10.2.2.tgz /usr/local/services/kafka

4、解压压缩包名重命名

 

tar -xvf kafka_2.12-0.10.2.2.tgz

5、创建zookeeper的日志存放路径

[root@kedazgyA kafka]# mkdir zookeeperlogs

6、修改zookeeper.properties文件

[root@kedazgyA kafka]# vim config/zookeeper.properties

7、启动zookeeper(后台启动)

[root@kedazgyA kafka]# nohup ./bin/zookeeper-server-start.sh ./config/zookeeper.properties &

8、查看zookeeper是否启动成功

 ps -ef | grep zookeeper

9、创建kafka日志包

mkdir kafkalogs

10.修改kafka配置文件

vim config/server.properties

 


 

 11、后台启动kafka

nohup ./bin/kafka-server-start.sh -daemon ./config/server.properties &

12、检查kafka是否启动成功

ps -ef | grep kafka

 


 


 


 

posted @ 2019-04-03 16:02  StudyJavaWeb  阅读(902)  评论(0编辑  收藏  举报