centos下编译安装kafka-manager

kafka-manager项目地址:https://github.com/yahoo/kafka-manager

Releases版本下载:https://github.com/yahoo/kafka-manager/releases

编译步骤:

1.安装maven:yum -y install maven

2.安装sbt:

curl https://bintray.com/sbt/rpm/rpm > bintray-sbt-rpm.repo
mv bintray-sbt-rpm.repo /etc/yum.repos.d/
yum -y install sbt

修改仓库地址为阿里云(注意每行后面不能有空格):vim ~/.sbt/repositories  

[repositories]
local
aliyun: http://maven.aliyun.com/nexus/content/groups/public/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots

3.下载并解压kafka-manager源码:

unzip kafka-manager-2.0.0.2.zip

4.执行编译命令:

cd kafka-manager-2.0.0.2/
./sbt clean dist

5.等待结果如下说明编译成功:

centos下编译安装kafka-manager_第1张图片

6. 进入 target/universal 目录下能看到 kafka-manager-2.0.0.2.zip

unzip kafka-manager-2.0.0.2.zip

7.启动服务

启动zk集群,kafka集群,再启动kafka-manager服务。

bin/kafka-manager 默认的端口是9000,
可通过 -Dhttp.port,指定端口; 
-Dconfig.file=conf/application.conf指定配置文件:

nohup bin/kafka-manager -Dconfig.file=conf/application.conf -Dhttp.port=8080 &

 

你可能感兴趣的:(kafka)