Windows平台为 ElasticSearch 6.x 安装 Head 客户端插件
背景知识
ES 5.x 以上版本安装 head 需要 node 和 grunt 环境(之前的直接用plugin命令即可安装)。
操作步骤
1. 安装 ElasticSearch 6.x,访问 http://localhost:9200/ 查看是否安装成功。
2. 安装 Node,使用 node -v 查看是否安装成功。
3. 在 Node 中执行 npm install -g grunt-cli 安装grunt,使用 grunt -version 查看是否安装成功。
4. 安装 elasticsearch-head。
4.1 访问 https://github.com/mobz/elasticsearch-head 下载 head 插件(选择 zip 压缩包下载方式)。
4.2 修改 ~\elasticsearch-6.6.2\elasticsearch-head-master\Gruntfile.js,在对应的位置加上 hostname:'*' 配置项。
4.3 在 ~\elasticsearch-6.6.2\elasticsearch-head-master 下执行 npm install 开始安装,完成后可执行 grunt server 或者 npm run start 运行 head 插件。
4.4 安装成功,访问 http://localhost:9100/。
答疑
Issue - 在 head 中连接 ES 失败。
对于 Access-Control-Allow-Origin 的问题,可以在 ElasticSearch 6.x 的 ~\config\elasticsearch.yml 文件的末尾加入以下代码:
http.cors.enabled: true http.cors.allow-origin: "*" node.master: true node.data: true
配置更新后,重启 ES 即可连接成功。
参考资料
https://www.cnblogs.com/hts-technology/p/8477258.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库