将Kafka安装为Windows服务 [英] Install Kafka as windows service

查看:55
本文介绍了将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环境的设置"和在发布模式下构建项目"的含义. http://www.lukemerrett.com/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" http://www.lukemerrett.com/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服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆