一、下载插件
GitHub下载地址:Elaticsearch-head
二、解压
将Elaticsearch-head
解压
三、确保安装了Node环境
如果没有安装node.js
,先安装node.js。
下载地址:node中文网、node官网
打开cmd,输入命令node -v
查看node版本号,确保安装成功
四、安装Node之后,需要安装grunt
使用npm
命令,经常会卡主,原因是国内的网络连接npm速度较慢,甚至很多东西都无法下载安装。
所以这里建议使用代理
的方式
npm config set registry https://registry.npm.taobao.org
如果你想更清楚的了解是卡在哪里,可以在命令后添加--verbose
然后再安装grunt
npm install -g grunt-cli --verbose
安装完grunt
之后还需install
npm install --verbose
五、启动Head服务
在解压的目录下,进入cmd
grunt server
六、允许跨域
到elasticSearch
的config/slasticsearch.yml
末尾去添加下面几行,允许跨域:
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
然后重启elasticsearch.bat