将Kafka安装为Windows服务

编程入门 行业动态 更新时间:2024-10-28 06:36:41
本文介绍了将Kafka安装为Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何安装和运行Apache Kafka作为Windows服务?现在,我需要转到命令提示符并启动zookeeper和kafka服务器.有什么方法可以将Apache Kafka安装为Windows服务吗?

How can I install and run Apache Kafka as windows service? Right now I need to go to command prompt and start zookeeper and kafka server. Is there any way so that I can install Apache Kafka as Windows service?

我仅在博客下方看到,但不知道调整Windows环境的设置"和在发布模式下构建项目"的含义. www.lukemerrett/2015/12/01/apache-kafka-windows-service-wrapper/

I saw only below blog but don't know what they mean by "Adjusts the settings for a Windows environment" and "Build the project in Release mode" www.lukemerrett/2015/12/01/apache-kafka-windows-service-wrapper/

谢谢!

推荐答案

执行以下所有指定的先决条件和安装步骤:在Windows操作系统上设置并运行Apache Kafka

Perform all the pre-requisites and installation steps as specified in: Setting Up and Running Apache Kafka on Windows OS

完成所有步骤,直到C节的第6步.

Complete all the steps till step 6 of section C.

(i)使用NSSM(免费服务管理器)并在路径和参数"中输入以下内容,为ZooKeeper创建Windows服务:路径:< ZooKeeper目录> \ bin \ windows \ zookeeper-server-start.bat 参数:< ZooKeeper目录> \ config \ zookeeper.properties

(i) Use NSSM (a FREE service manager) and enter the below in Path and Arguments, to create a Windows service for ZooKeeper: Path: <ZooKeeper directory>\bin\windows\zookeeper-server-start.bat Arguments: <ZooKeeper directory>\config\zookeeper.properties

(ii)使用NSSM(免费服务管理器)并在路径和参数"中输入以下内容,以为Kafka创建Windows服务:路径:< Kafka目录> \ bin \ windows \ kafka-server-start.bat 参数:< Kafka目录> \ config \ kafka.properties

(ii) Use NSSM (a FREE service manager) and enter the below in Path and Arguments, to create a Windows service for Kafka: Path: <Kafka directory>\bin\windows\kafka-server-start.bat Arguments: <Kafka directory>\config\kafka.properties

提供ZooKeeper服务的依赖项(在Kafka的NSSM设置的Dependencies选项卡下),以便在启动Kafka服务时,ZooKeeper服务会自动启动(如果尚未运行).

Provide a dependency of ZooKeeper service (under the Dependencies tab in the NSSM setup of Kafka), so that when you startup Kafka service, ZooKeeper service is automatically started (if it isn't running already).

NB:请注意,ZooKeeper随Kafka一起提供,用于启动和停止ZooKeeper服务的二进制文件位于同一< Kafka目录> \ bin \ windows \ 目录中.

NB: Please note that ZooKeeper ships with Kafka, and the binaries to start and stop the ZooKeeper service is found in the same <Kafka directory>\bin\windows\ directory.

希望它能解释!

更多推荐

将Kafka安装为Windows服务

本文发布于:2023-11-06 22:04:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564791.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Kafka   Windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!