Elasticsearch插件体系.docx_第1页
Elasticsearch插件体系.docx_第2页
Elasticsearch插件体系.docx_第3页
Elasticsearch插件体系.docx_第4页
Elasticsearch插件体系.docx_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Elasticsearch插件体系插件分类Elasticsearch支持三种类型的插件:1、java插件这些插件只包含Jar文件,并且必须安装在集群中的每个节点上。安装后,每个节点必须重新启动,该插件才变得可见。2、站点插件这些插件包含了静态的Web内容,如JavaScript,HTML和CSS文件,可直接从Elasticsearch访问。站点插件可能只需要在一个节点上安装,并且不需要重新启动就能变得可见。站点插件的内容是通过一个类似的网址访问:HTTP:/ / yournode:9200 / _plugin / 插件名称3、混合插件混合插件同时包含jar文件和静态的Web内容插件管理命令查看1、查看plugin命令用法:sudo bin/plugin -h插件安装2、安装Elasticsearch核心插件命令格式:sudo bin/plugin install plugin_name例子:sudo bin/plugin install analysis-icu该命令将安装与你的Elasticsearch版本相匹配的插件版本。3、安装社区插件或非核心插件 非核心插件由Elasticsearch提供,或者由社区提供,可以从download.elastic.co,Maven(中央和Sonatype),或从GitHub安装。在这种情况下,命令如下:sudo bin/plugin install org/user|component/version例子:sudo bin/plugin install lmenezes/elasticsearch-kopf sudo bin/plugin install lmenezes/elasticsearch-kopf/2.x Installs the latest version from GitHub.Installs the 2.x version from GitHub.从Maven Central/Sonatype安装时,org需要替换为groupId, user|component替换为artifactId. For plugin from Sonatype, run:sudo bin/plugin install org.elasticsearch.plugin/mapper-attachments/3.0.0 当从 download.elastic.co或 Maven Central/Sonatype安装时, version 是必须的。自定义URL或文件系统插件可以直接从自定义URL下载,格式如下:sudo bin/plugin install url must be a valid URL, the plugin name is determined from its descriptor.例如从本地文件系统安装插件:sudo bin/plugin install file:/path/to/plugin.zipThe plugin script will refuse to talk to an HTTPS URL with an untrusted certificate. To use a self-signed HTTPS cert, you will need to add the CA cert to a local Java truststore and pass the location to the script as follows:sudo bin/plugin -D.ssl.trustStore=/path/to/trustStore.jks install https:/.查询及删除插件列出已加载的插件sudo bin/plugin list删除插件方式1:删除plugins/目录下的插件对应的文件夹,即可删除插件, 方式2:使用脚本:sudo bin/plugin remove pluginname插件删除以后需要重新启动服务节点。plugin命令的其他参数Silent/Verbose模式-verbose:输出调试信息-silent:关闭所有输出 plugin命令可能返回的错误码:0everything was OK64unknown command or incorrect option parameter74IO error70any other error指定自定义配置文件目录如果 elasticsearch.yml在自定义位置, 使用plugin命令时需要指定配置文件位置。格式如下:sudo bin/plugin -Des.path.conf=/path/to/custom/config/dir install 也可以设置CONF_DIR环境变量来设置自定义的配置文件目录。超时设置默认情况, 插件脚本将在未下载的时候等待下去。超时参数可以用来显式地指定等待多长时间。下面是将其设置为不同的值的一些例子:# Wait for 30 seconds before failingsudo bin/plugin install mobz/elasticsearch-head -timeout 30s# Wait for 1 minute before failingsudo bin/plugin install mobz/elasticsearch-head -timeout 1m# Wait forever (default)sudo bin/plugin install mobz/elasticsearch-head -timeout 0Proxy设置通过代理安装一个插件,需要指定proxy host和proxy port。在基于Unix的系统上,如下sudo bin/plugin install mobz/elasticsearch-head -DproxyHost=host_name -DproxyPort=port_number在Windows下, 需要添加JAVA_OPTS环境变量:set JAVA_OPTS=-DproxyHost=host_name -DproxyPort=port_numberbin/plugin install mobz/elasticsearch

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论