elasticsearch & elasticsearch-head安裝 [window 平臺]

網上關於安裝教程太多了,今天在window平臺跑一跑,很香~~node

gopkg.in/olivere/elastic.v5以上版本安裝head須要安裝node和gruntgit

`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文件github

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.pngnpm

相關文章
相關標籤/搜索