elasticsearch-head-master是一个可视化工具
安装elasticsearch-head-master的前提需要安装node.js
1.下载elasticsearch-head-master
https://github.com/mobz/elasticsearch-head
2. 解压elasticsearch-head-master
sudo unzip elasticsearch-head-master.zip
3. 切换到安装node.js目录
npm install -g grunt-cli
npm install
如果连个命令出现错误,
npm cache clean --force
4.修改elasticsearch-head-master的Gruntfile.js,增加hostname, 修改为hostname: '*',
cd elasticsearch-head-master
vi Gruntfile.js
5.修改elaticsearch服务器的地址。
vi /usr/local/elasticsearch-head-master/_site/app.js
6.修改/usr/local/elasticsearch-5.0.0/config
最下面增加配置
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
7. 打开防火墙9100端口
8. 进入elasticsearch-head-master目录启动
grunt server
如果启动 报错
npm install grunt --save-dev