由于 Elasticsearch 5.0 head 插件不能以插件形式安装,需要单独安装,详见以下连接:
https://github.com/mobz/elasticsearch-head
Running as a plugin of Elasticsearch
Install elasticsearch-head:
- – for Elasticsearch 5.x:
site plugins are not supported. Run elasticsearch-head as a standalone server
安装步骤:
Running with built in server
- enable cors by adding
http.cors.enabled: true
in elasticsearch configuration. Don’t forget to also sethttp.cors.allow-origin
because no origin allowed by default.http.cors.allow-origin: "*"
is valid value, however it’s considered as a security risk as your cluster is open to cross origin from anywhere. Check Elasticsearch documentation on this parameter:https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html#modules-http git clone git://github.com/mobz/elasticsearch-head.git
cd elasticsearch-head
npm install
grunt server
open
http://localhost:9100/
#git clone git://github.com/mobz/elasticsearch-head.git
#cd elasticsearch-head
#npm install
#npm install grunt
PS:npm 工具需要安装nodejs,才有此命令。建议下载老版nodejs,新版本nodejs要求c++编译工具升级才能顺利安装。
nodejs安装步骤如下:
#tar zxvf node-v0.12.16.tar.gz
#cd node-v0.12.16
#./configure
#make
#make install
启动
#/opt/elasticsearch-head/node_modules/grunt/bin/grunt server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on localhost:9100