elasticsearch-elasticsearchhead安装-window-平台

6次阅读

共计 501 个字符,预计需要花费 2 分钟才能阅读完成。

网上关于安装教程太多了,今天在 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 文件

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

        connect: {
            server: {
                options: {
                    hostname: '0.0.0.0',
                    port: 9100,
                    base: '.',
                    keepalive: true
                }
            }
        }

以上步骤完成运行效果

正文完
 0