如何安装和运行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服务
发布评论