在隔离环境中使用 sbt 安装 Kafka

Install Kafka with sbt in an isolated environment

我正在尝试在 RHEL 6.6 上使用以下 instructions:

安装 Kafka
> tar xzf kafka-<VERSION>.tgz
> cd kafka-<VERSION>
> ./sbt update
> ./sbt package

使用 bintray rpm repository 中的 yum install sbt-0.13.9.rpm 安装 sbt 时,一切正常,但是当尝试执行 sbt 命令时,我总是遇到以下错误:

root@servername:/# sbt
Getting org.scala-sbt sbt 0.13.9 ...

:: problems summary ::
:::: WARNINGS
                module not found: org.scala-sbt#sbt;0.13.9

        ==== local: tried

          /root/.ivy2/local/org.scala-sbt/sbt/0.13.9/ivys/ivy.xml

          -- artifact org.scala-sbt#sbt;0.13.9!sbt.jar:

          /root/.ivy2/local/org.scala-sbt/sbt/0.13.9/jars/sbt.jar

        ==== my-maven-proxy-releases: tried

          http://nexus-bp2s.is.echonet/content/groups/public/org/scala-sbt/sbt/0.13.9/sbt-0.13.9.pom

          -- artifact org.scala-sbt#sbt;0.13.9!sbt.jar:

          http://nexus-bp2s.is.echonet/content/groups/public/org/scala-sbt/sbt/0.13.9/sbt-0.13.9.jar

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.scala-sbt#sbt;0.13.9: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.9: not found
Error during sbt execution: Error retrieving required libraries
  (see /root/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 

最大的问题是我需要让它在封闭的内网环境中工作。

我已经尝试将我们的 nexus 代理添加为 maven 存储库,但仍然不起作用。

所以最大的问题是我怎样才能完全在本地安装 sbt(不需要连接到任何地方)?或者是否有在 RHEL 6.6 中安装 Kafka 的替代方法?以及如何?

出于某种原因,您最终找到了可能仍然存在的最旧 Kafka 版本 (v0.7) 的说明,该版本于 2012 年发布。:-)

So the big question is how can I install sbt completely local (no need for it to connect anywhere)?

现在 Kafka 甚至不再使用 sbt,所以不需要在任何地方安装 sbt(也不需要它连接任何地方)。

相反,请按照 http://kafka.apache.org/documentation.html#quickstart_download 上的最新说明进行操作:

Download the 0.10.0.1 release and un-tar it.

$ tar -xzf kafka_2.11-0.10.0.1.tgz
$ cd kafka_2.11-0.10.0.1

就是这样。您不需要进行任何 sbt update 调用等

Or is there an alternative to install Kafka in RHEL 6.6? And how?

如果您更喜欢在 RHEL 6 上安装的即用型 RPM(因此您可以使用 yum install ...,或 Puppet、Ansible 等),您可能想看看 http://docs.confluent.io/3.0.1/installation.html#installation-yum.

PS: 或者你真的想安装 Kafka 0.7?除非你有非常 special/good 的理由这样做,否则我绝对建议不要碰它,而是使用最稳定的版本,即 Kafka 0.10.0。