当前位置: 首页 > 后端技术 > PHP

elasticsearch&elasticsearch-head安装【window平台】

时间:2023-03-29 17:07:12 PHP

网上安装教程太多了。今天在window平台上跑,很香~~gopkg.in/olivere/elastic.v5以上安装head需要安装node和grunt`gitclonegit://github.com/mobz/elasticsearch-head.git``cdelasticsearch-head``npminstall``npmrunstart``open`[http://localhost:9100/](http//localhost:9100/)配置elasticsearch.yml文件,添加此文件末尾的代码。记得重启Elasticsearchhttp.cors.enabled:truehttp.cors.allow-origin:"*"修改elasticsearch-head目录在下面的Gruntfile.js文件中,在options属性中添加hostname,设置为0.0.0.0connect:{server:{options:{hostname:'0.0.0.0',port:9100,base:'.',keepalive:true}}}以上步骤完成运行效果