安装Kafka作为Windows服务

Sam*_*Sam 4 windows-services apache-kafka

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

我只在博客下方看到,但不知道它们的意思是"调整Windows环境的设置"和"在发布模式下构建项目" http://www.lukemerrett.com/2015/12/01/apache-卡夫卡-窗口服务包装/

谢谢!

Sri*_*amS 7

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

完成到C部分第6步的所有步骤.

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

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

提供ZooKeeper服务的依赖关系(在Kafka的NSSM设置中的Dependencies选项卡下),这样当您启动Kafka服务时,ZooKeeper服务会自动启动(如果它尚未运行).

注意:请注意,ZooKeeper附带Kafka,启动和停止ZooKeeper服务的二进制文件位于同一<Kafka directory>\bin\windows\目录中.

希望它解释!