网上关于安装教程太多了,今天在window平台跑一跑,很香~~

gopkg.in/olivere/elastic.v5以上版本安装head需要安装node和grunt

   `git clone git://github.com/mobz/elasticsearch-head.git`
   `cd elasticsearch-head`
   `npm install`
   `npm run start`
   `open` [http:// localhost:9100 /](http://localhost:9100/)

配置 elasticsearch.yml文件

image.png
在此文件尾端加上一下代码即可,记得要重启Elasticsearch
http.cors.enabled: true
http.cors.allow-origin: "*"
修改 elasticsearch-head 目录下的 Gruntfile.js 文件,在 options 属性内增加 hostname,设置为 0.0.0.0
image.png
        connect: {
            server: {
                options: {
                    hostname: '0.0.0.0',
                    port: 9100,
                    base: '.',
                    keepalive: true
                }
            }
        }

以上步骤完成运行效果
image.png


code
64 声望2 粉丝

生命的意义并不刻意在什么地方停留