Windows下的Elasticsearch-head安装

本文指导如何在Windows环境下通过Git克隆并使用npm安装Elasticsearch-head,解决npm安装过程中可能遇到的phantomjs下载问题,包括直接下载和使用淘宝镜像cnpm的方式。
摘要由CSDN通过智能技术生成

Windows下的Elasticsearch-head安装

参考:https://gitcode.net/mirrors/mobz/elasticsearch-head

需要用到 npm 命令,这里可以提前下载安装下Node.js 即可自动安装npm
Node.js 下载安装地址:https://nodejs.org/en/download


# 进到本地某一个目录下
git clone https://gitcode.net/mirrors/mobz/elasticsearch-head.git

# 找到安装并进入 elasticsearch-head目录,选中当前目录,cmd 回车进入,依次执行以下命令
npm install
npm run start

在这里插入图片描述

在这里插入图片描述


  • npm install 可能出现的报错:
npm ERR! code 1
npm ERR! path D:\es_head\elasticsearch-head\node_modules\phantomjs-prebuilt
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! PhantomJS not found on PATH
npm ERR! Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip

在这里插入图片描述

报错日志提示文件如无法下载,两种方式处理:

(出自:https://www.cnblogs.com/wlgwilianm123/p/14167621.html)

  1. 网速允许直接下载
npm install -g phantomjs
  1. 先进行淘宝镜像安装,再用cnpm进行下载
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install -g phantomjs

安装完之后,回过头去重新执行两条npm命令即可


执行完成之后打开浏览器访问端口即可

http://localhost:9100/

在这里插入图片描述


PS:如果有写错或者写的不好的地方,欢迎各位大佬在评论区留下宝贵的意见或者建议,敬上!如果这篇博客对您有帮助,希望您可以顺手帮我点个赞!不胜感谢!


原创作者:wsjslient


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值