首先说明下我安装时的环境是windows10。
安装步骤
安装node.js,下载与自己系统符合的版本进行安装:
安装完成后可在命令行中输入:node -v查看版本
下载Elasticsearch-Head
下载解压后的目录:
cmd命令行进入此目录,执行npm install,成功后执行npm run start:
服务开启成功后,在浏览器访问localhost:9100,一开始集群健康值可能会显示:未连接
如果显示未连接,则找到Elasticsearch安装目录(注意,不是Elasticsearch-head安装目录),打开config/elasticsearch.yml,在最下方增加以下代码:
保存后重启Elasticsearch和Elasticsearch-head。
end
http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
如果帮助到你,请赏杯奶茶喝~
- 本文链接: https://www.shx1024.top//index/article/details/article_id/62.shtml
- 版权声明:本博客所有文章除特别声明外,均默认采用 许可协议。