4

I'm trying to install an ElasticSearch plugin on Ubuntu 12.04, and the documentation is not helping me. The plugin is distributed as a jar, and I've tried installing it with the plugin command without apparent success:

[13:28:38][root@pre-staging:/usr/share/elasticsearch]$ curl -I file:///usr/share/elasticsearch/plugins-no/elasticsearch-knapsack-1.0.3.jar
Content-Length: 322631
Accept-ranges: bytes
Last-Modified: Thu, 13 Dec 2012 18:47:04 GMT
[13:29:56][root@pre-staging:/usr/share/elasticsearch]$ bin/plugin -url file:///usr/share/elasticsearch/plugins-no/elasticsearch-knapsack-1.0.3.jar
[13:30:01][root@pre-staging:/usr/share/elasticsearch]$ ls plugins
[13:30:03][root@pre-staging:/usr/share/elasticsearch]$

You can see that the jar file exists, but when I install it nothing happens to the plugins directory. I've also tried manually adding the jar to the plugins directory. I have no idea whether that's supposed to work, or whether I'd see something in the elasticsearch log if I did things right, but I don't, and I don't see the behavior the plugin's documentation makes me expect I should. I've also followed the plugin's installation instructions directly, https://github.com/jprante/elasticsearch-knapsack, which don't do anything useful either (the installation can't find whatever remote files it expects to install the plugin).

So the question is - How do I install this plugin? How can I tell if it's been installed correctly?

4

1 回答 1

9

plugin命令没有做任何特别的事情,它只是尝试从不同的位置下载 zip 文件并将其解压缩到插件下的特定子文件夹中。大多数插件过去都可以直接作为 GitHub 下载使用,但由于 GitHub已禁用其下载功能,因此正在讨论什么是解决此问题的最佳方法。来自 elasticsearch 团队的插件已被移至download.elasticsearch.org插件命令,最近更新了插件命令以反映此更改。查看相关问题和有关它的博客文章。

无论如何,如果您在使用 plugin 命令时遇到问题,您可以下载 zip 文件并将其解压缩到 plugins 下的特定子文件夹中。之后,您需要重新启动 elasticsearch 节点,您将在输出中看到在启动期间已找到并成功加载的插件列表。鉴于您的解释,我猜您没有在插件下创建背包(或您喜欢的任何其他名称)文件夹。只需创建它并将 jar 放在该文件夹中。

于 2013-01-23T11:47:23.633 回答