elasticsearch_head插件安装

一、安装nodejs

去官网下载nodejs,https://nodejs.org/en/download/

1.安装nodejs

现在的版本中已经集合了npm;npm是nodejs的包管理工具。

2.安装后使用名令测试,如果没有报错,则说明安装成功

> node -v
v10.15.2
> npm -v
6.4.1

设置 全局缓存和前缀,在nodejs安装目录创建目录node_global,node_cache,通过命令设置

npm config set prefix “C:Program Files
odejs
ode_global” 

npm config set cache “C:Program Files
odejs
ode_cache“
  1. 安装 grunt ,
1.临时使用
npm --registry https://registry.npm.taobao.org install express

2.持久使用
npm config set registry https://registry.npm.taobao.org

配置后可通过下面方式来验证是否成功 
npm config get registry

安装命令

npm install -g grunt-cli

清除缓存

npm cache clean -f

二、安装elasticsearch-head

  1. 下载https://github.com/mobz/elasticsearch-head

  2. 修改配置文件 ,打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: ‘0.0.0.0’:

  connect: {
        server: {
            options: {
                hostname: '0.0.0.0',
                port: 9100,
                base: '.',
                keepalive: true
            }
        }
    }   
  1. 安装并启动
 到elasticsearch-head目录下
 下载依赖命令:npm install
  启动命令:npm run start

三、连接

  1. 根据提示的访问地址访问http://localhost:9100/,输入es集群地址连接
原文地址:https://www.cnblogs.com/mumian2/p/10471093.html