ES 5.X 版本后就不支持 elasticsearch-head 以插件方式来安装了。
for Elasticsearch 5.x: site plugins are not supported. Run as a standalone server
for Elasticsearch 2.x: sudo elasticsearch/bin/plugin install mobz/elasticsearch-head
for Elasticsearch 1.x: sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/1.x
for Elasticsearch 0.x: sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/0.9
open http://localhost:9200/_plugin/head/
Google 一番发现很多都是使用源码的方式, node ,grunt 一顿配置 ,相对比较繁琐;其实 elasticsearch-head 官方还可以使用 docker 容器的方式来运行,简单粗暴
for Elasticsearch 5.x: docker run -p 9100:9100 mobz/elasticsearch-head:5
for Elasticsearch 2.x: docker run -p 9100:9100 mobz/elasticsearch-head:2
for Elasticsearch 1.x: docker run -p 9100:9100 mobz/elasticsearch-head:1
for fans of alpine there is mobz/elasticsearch-head:5-alpine
最后记得配置跨域,重启 ES ,访问 http://localhost:9100/
#Enable CORS in elasticsearch
http.cors.enabled: true
http.cors.allow-origin: "*"
REFER:
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
https://github.com/mobz/elasticsearch-head
Elasticsearch 5.X 使用 Docker 运行使用 Head 插件
原文:http://www.cnblogs.com/Irving/p/7163589.html