.sh执行时要求“如何打开此文件”,而不是在cmd中执行

bvuwiixz  于 2021-06-06  发布在  Kafka
关注(0)|答案(2)|浏览(283)

我已经下载了Kafka,并试图执行开始脚本使用

.\bin\kafka-server-start.sh
.\config\server.properties

在cmd提示符下,但脚本没有执行,而是windows抛出“how do you want to open this.sh file”。
“set associations”中当前的默认值是“unknown application”,无法理解为什么不执行它。

w6mmgewl

w6mmgewl1#

kafka在windows环境中有单独的批处理文件 <kafka dir>/bin/windows 目录。使用这些在windows环境下运行。
使用 kafka-server-start.bat 以及 kafka-server-stop.bat 对于Kafka集群。
你可以找到更多的细节。https://github.com/apache/kafka/tree/trunk/bin/windows

eanckbw9

eanckbw92#

中的所有脚本都有windows版本 bin/windows 目录,请参阅https://github.com/apache/kafka/tree/trunk/bin/windows.
在windows上运行时,请使用这些脚本,而不是普通的shell脚本。这一点在文档的快速入门部分的第一行中有提到。

相关问题