How to install kafka-manager under Centos7
This article introduces the knowledge of "how to install kafka-manager under Centos7". 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!
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 to install kafka-manager under Centos7" 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!