{"id":174662,"date":"2020-03-29T10:16:08","date_gmt":"2020-03-29T02:16:08","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=174662"},"modified":"2020-03-18T08:22:21","modified_gmt":"2020-03-18T00:22:21","slug":"centos7-kafka-manager","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/centos7-kafka-manager.html","title":{"rendered":"Centos7\u7f16\u8bd1\u5b89\u88c5kafka-manager\u6559\u7a0b"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nkafka-manager\u662f\u76ee\u524d\u6700\u53d7\u6b22\u8fce\u7684kafka\u96c6\u7fa4\u7ba1\u7406\u5de5\u5177\uff0c\u6700\u65e9\u7531\u96c5\u864e\u5f00\u6e90\uff0c\u7528\u6237\u53ef\u4ee5\u5728Web\u754c\u9762\u6267\u884c\u4e00\u4e9b\u7b80\u5355\u7684\u96c6\u7fa4\u7ba1\u7406\u64cd\u4f5c\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u5177\u4f53\u652f\u6301\u4ee5\u4e0b\u5185\u5bb9<\/strong><\/span><\/div>\n

\u7ba1\u7406\u591a\u4e2a\u96c6\u7fa4<\/p>\n

\u8f7b\u677e\u68c0\u67e5\u7fa4\u96c6\u72b6\u6001\uff08\u4e3b\u9898\uff0c\u6d88\u8d39\u8005\uff0c\u504f\u79fb\uff0c\u4ee3\u7406\uff0c\u526f\u672c\u5206\u53d1\uff0c\u5206\u533a\u5206\u53d1\uff09<\/p>\n

\u8fd0\u884c\u9996\u9009\u526f\u672c\u9009\u4e3e<\/p>\n

\u4f7f\u7528\u9009\u9879\u751f\u6210\u5206\u533a\u5206\u914d\u4ee5\u9009\u62e9\u8981\u4f7f\u7528\u7684\u4ee3\u7406<\/p>\n

\u8fd0\u884c\u5206\u533a\u91cd\u65b0\u5206\u914d\uff08\u57fa\u4e8e\u751f\u6210\u7684\u5206\u914d\uff09<\/p>\n

\u4f7f\u7528\u53ef\u9009\u4e3b\u9898\u914d\u7f6e\u521b\u5efa\u4e3b\u9898\uff080.8.1.1\u5177\u6709\u4e0e0.8.2+\u4e0d\u540c\u7684\u914d\u7f6e\uff09<\/p>\n

\u5220\u9664\u4e3b\u9898\uff08\u4ec5\u652f\u63010.8.2+\u5e76\u8bb0\u4f4f\u5728\u4ee3\u7406\u914d\u7f6e\u4e2d\u8bbe\u7f6edelete.topic.enable = true\uff09<\/p>\n

\u4e3b\u9898\u5217\u8868\u73b0\u5728\u6307\u793a\u6807\u8bb0\u4e3a\u5220\u9664\u7684\u4e3b\u9898\uff08\u4ec5\u652f\u63010.8.2+\uff09<\/p>\n

\u6279\u91cf\u751f\u6210\u591a\u4e2a\u4e3b\u9898\u7684\u5206\u533a\u5206\u914d\uff0c\u5e76\u53ef\u9009\u62e9\u8981\u4f7f\u7528\u7684\u4ee3\u7406<\/p>\n

\u6279\u91cf\u8fd0\u884c\u91cd\u65b0\u5206\u914d\u591a\u4e2a\u4e3b\u9898\u7684\u5206\u533a<\/p>\n

\u5c06\u5206\u533a\u6dfb\u52a0\u5230\u73b0\u6709\u4e3b\u9898<\/p>\n

\u66f4\u65b0\u73b0\u6709\u4e3b\u9898\u7684\u914d\u7f6e<\/p>\n

\u652f\u6301ldap\u7528\u6237\u8ba4\u8bc1<\/p>\n

kafka-manager \u9879\u76ee\u5730\u5740\uff1ahttps:\/\/github.com\/yahoo\/kafka-manager<\/p>\n

\u5b89\u88c5<\/strong><\/span><\/div>\n

\u5f53\u524d\u7248\u672c\u5df2\u66f4\u65b0\u81f33.0.0.1\uff0c\u672c\u6b21\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002<\/p>\n

\u4e0b\u8f7d\u6e90\u7801\u5305\uff1ahttps:\/\/github.com\/yahoo\/kafka-manager\/releases (\u4e0d\u540c\u7248\u672c)<\/p>\n

\u514b\u9686\u6e90\u4ee3\u7801\uff1agit clone https:\/\/github.com\/yahoo\/CMAK.git \uff08\u6700\u65b0\u7248\u672c\uff09<\/p>\n

\u7f16\u8bd1<\/strong><\/span><\/div>\n

\u6839\u636eREADME\u63d0\u793a\uff0c\u65b0\u7248\u672c\u7f16\u8bd1\u4f9d\u8d56java-11\uff0c\u6240\u4ee5\u9996\u5148\u8981\u51c6\u5907java-11\u73af\u5883\uff08\u76f4\u63a5\u5230\u5b98\u7f51\u4e0b\u8f7d\u89e3\u538b\u5373\u53ef\uff09\u3002<\/p>\n

\u4f7f\u7528sbt\u7f16\u8bd1<\/strong><\/span><\/div>\n

\u8fdb\u5165\u6e90\u7801\u76ee\u5f55\u8fdb\u884c\u7f16\u8bd1\u3002<\/p>\n

\r\n\/path\/to\/cmak\/sbt -java-home \/path\/to\/java-11 clean dist\r\n<\/pre>\n

-java-home\uff1a\u5728\u7cfb\u7edf\u73af\u5883java\u7248\u672c\u548c\u5f53\u524d\u9700\u8981java\u7248\u672c\u4e0d\u4e00\u81f4\u65f6\uff0c\u4f7f\u7528\u8be5\u53c2\u6570\u6307\u5b9ajava\u5bb6\u76ee\u5f55\u3002<\/p>\n

\u8fd9\u662f\u4e00\u4e2a\u6f2b\u957f\u7684\u8fc7\u7a0b\uff0c\u8010\u5fc3\u7b49\u5f85...<\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540e\u4f1a\u63d0\u793a\uff0c\u7f16\u8bd1\u597d\u7684\u6587\u4ef6\u4fdd\u5b58\u5230\u4e86\uff1a\/path\/to\/cmak\/target\/universal\/cmak-3.0.0.1.zip<\/p>\n

\u914d\u7f6e<\/strong><\/span><\/div>\n

\u5c06\u4e0a\u8ff0cmak-3.0.0.1.zip\u6587\u4ef6\u62f7\u8d1d\u5230\/path\/to\/kafka-manager \u76ee\u5f55\u4e0b\uff0c\u89e3\u538b\u3002\u4fee\u6539\u914d\u7f6e\u6587\u4ef6 conf\/application.conf\uff1a<\/p>\n

\r\nkafka-manager.zkhosts=\"my.zookeeper.host.com:2181,other.zookeeper.host.com:2181\"\r\n\r\ncmak.zkhosts=\"my.zookeeper.host.com:2181,other.zookeeper.host.com:2181\"\r\n<\/pre>\n

kafka-manager\u652f\u6301ldap\u8ba4\u8bc1\uff0c\u8fd9\u91cc\u4e0d\u505a\u8be6\u8ff0\u3002<\/p>\n

\u542f\u52a8<\/strong><\/span><\/div>\n

\u9ed8\u8ba4\u4f7f\u75289000\u7aef\u53e3\uff0c\u5982\u679c\u7aef\u53e3\u5360\u7528\uff0c\u53ef\u4ee5\u6307\u5b9a\u7aef\u53e3\u3002<\/p>\n

\r\nbin\/cmak -Dconfig.file=conf\/application.conf -java-home \/path\/to\/jdk-11 -Dhttp.port=9001\r\n<\/pre>\n

\u5230\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/ip:9001 \u5373\u53ef\u3002<\/p>\n

\u521b\u5efakafka\u96c6\u7fa4<\/strong><\/span><\/div>\n

\u4f7f\u7528systemctl\u7ba1\u7406kafka-manager\u670d\u52a1<\/p>\n

\u521b\u5efa\u6587\u4ef6 \/usr\/lib\/systemd\/system\/kafka-manager.service \uff1a<\/p>\n

\r\n[Unit]\r\nDescription=kafka-manager server service\r\nAfter=network.target\r\n\r\n[Service]\r\nWorkingDirectory=\/path\/to\/kafka-manager\/cmak-3.0.0.1\r\nExecStart=\/path\/to\/kafka-manager\/cmak-3.0.0.1\/bin\/cmak -Dconfig.file=\/path\/to\/kafka-manager\/cmak-3.0.0.1\/conf\/application.conf -java-home \/path\/to\/jdk-11.0.6 -Dhttp.port=9001\r\nRestart=on-failure\r\nRestartSec=60\r\nUser=work\r\nGroup=work\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n

\u5b8c\u6210\u4e0a\u8ff0\u914d\u7f6e\u540e\uff0c\u6267\u884c systemctl daemon-reload \u3002<\/p>\n

\u542f\u52a8\u3001\u505c\u6b62\u3001\u91cd\u542f<\/strong><\/span><\/div>\n
\r\n$ systemctl start kafka-manager\r\n$ systemctl stop kafka-manager\r\n$ systemctl restart kafka-manager\r\n<\/pre>\n

# \u52a0\u5165\u5f00\u673a\u542f\u52a8<\/p>\n

\r\n$ systemctl enable kafka-manager\r\n<\/pre>\n

\u914d\u7f6e\u65e5\u5fd7\u5207\u5272<\/p>\n

\r\n\/path\/to\/kafka-manager\/cmak-3.0.0.1\/logs\/application.log {\r\n    daily\r\n    rotate 10\r\n    dateext\r\n    missingok\r\n    notifempty\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u7ba1\u7406\u591a\u4e2a\u96c6\u7fa4 \u8f7b\u677e\u68c0\u67e5\u7fa4\u96c6\u72b6\u6001\uff08\u4e3b\u9898\uff0c\u6d88\u8d39\u8005\uff0c\u504f\u79fb\uff0c\u4ee3\u7406\uff0c\u526f\u672c\u5206\u53d1\uff0c\u5206\u533a\u5206\u53d1\uff09 \u8fd0\u884c\u9996\u9009\u526f\u672c\u9009\u4e3e \u4f7f\u7528\u9009\u9879\u751f\u6210 […]<\/p>\n","protected":false},"author":1479,"featured_media":174682,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-174662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1479"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=174662"}],"version-history":[{"count":3,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174662\/revisions"}],"predecessor-version":[{"id":174681,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/174662\/revisions\/174681"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/174682"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=174662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=174662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=174662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}