elasticsearch head 可视化工具 安装

张映 发表于 2018-04-27

分类目录: elasticsearch, 服务器相关

标签:, ,

es5.x以前,head是以插件的形势安装的,5.x以后做为独立的服务来运行的。如果把elasticsearch,理解成数据库的话,那么head就相当于数据库可视化管理工具。

1,安装elasticsearch head

$ git clone https://github.com/mobz/elasticsearch-head.git
$ cd elasticsearch-head
$ npm install
$ npm run start

> elasticsearch-head@0.0.0 start /Users/zhangying/es/elasticsearch-head
> grunt server

(node:22286) ExperimentalWarning: The http2 module is an experimental API.
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100  //启动成功

2,配置elasticsearch.yml

http.cors.enabled: true
http.cors.allow-origin: "*"   //可以是具体IP

这一步很重要的,因为牵扯到跨域问题。如果不做会报以下错误:

Failed to load resource: Origin http://localhost:9100 is not allowed by Access-Control-Allow-Origin.

3,重新启动elasticsearch.

es head 可视化插件

es head 可视化插件



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/server/1895.html