Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to compile and install kafka-manager for Centos7

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how Centos7 compiles and installs kafka-manager". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Managing multiple clusters specifically supports the following

Easily check cluster status (subject, consumer, offset, agent, replica distribution, partition distribution)

Run the preferred copy election

Use the option to generate a partition assignment to select the agent to use

Run partition reassignment (based on generated allocation)

Create a theme with an optional theme configuration (0.8.1.1 has a different configuration than 0.8.2 +)

Delete the theme (only 0.8.2 + is supported and remember to set delete.topic.enable = true in the proxy configuration)

The topic column is shown in the topic that indicates the topic marked for deletion (only 0.8.2 + is supported)

Batch generate partition assignments for multiple topics, and you can select agents to use

Run a batch of partitions that reassign multiple topics

Add a partition to an existing topic

Update the configuration of an existing theme

Support for ldap user authentication

Kafka-manager project address: https://github.com/yahoo/kafka-manager

Installation

The current version has been updated to 3.0.0.1, and the latest version is installed this time.

Download the source package: https://github.com/yahoo/kafka-manager/releases (different versions)

Clone source code: git clone https://github.com/yahoo/CMAK.git (latest version)

Compile

According to the README prompt, the compilation of the new version depends on java-11, so first prepare the java-11 environment (download and decompress directly to the official website).

Compile with sbt

Go to the source directory to compile.

/ path/to/cmak/sbt-java-home / path/to/java-11 clean dist

-java-home: use this parameter to specify the java home directory when the java version of the system environment is inconsistent with the current java version.

This is a long process, wait patiently.

When the compilation is complete, you will be prompted that the compiled file is saved to: / path/to/cmak/target/universal/cmak-3.0.0.1.zip

Configuration

Copy the above cmak-3.0.0.1.zip file to the / path/to/kafka-manager directory and extract it. Modify the configuration file conf/application.conf:

Kafka-manager.zkhosts= "my.zookeeper.host.com:2181,other.zookeeper.host.com:2181" cmak.zkhosts= "my.zookeeper.host.com:2181,other.zookeeper.host.com:2181"

Kafka-manager supports ldap authentication, which is not detailed here.

Start

Port 9000 is used by default, and if the port is occupied, you can specify the port.

Bin/cmak-Dconfig.file=conf/application.conf-java-home / path/to/jdk-11-Dhttp.port=9001

Just go to the browser and visit http://ip:9001.

Create a kafka cluster

Use systemctl to manage kafka-manager services

Create the file / usr/lib/systemd/system/kafka-manager.service:

[Unit] Description=kafka-manager server serviceAfter= network.target [service] WorkingDirectory=/path/to/kafka-manager/cmak-3.0.0.1ExecStart=/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=9001Restart=on-failureRestartSec=60User=workGroup=work [Install] WantedBy=multi-user.target

After the above configuration is completed, systemctl daemon-reload is executed.

Start, stop, restart

$systemctl start kafka-manager$ systemctl stop kafka-manager$ systemctl restart kafka-manager

# join Boot Boot

$systemctl enable kafka-manager

Configure log slicing

/ path/to/kafka-manager/cmak-3.0.0.1/logs/application.log {daily rotate 10 dateext missingok notifempty} "how Centos7 compiles and installs kafka-manager" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report