美文网首页
Elasticsearch head插件安装

Elasticsearch head插件安装

作者: Movle | 来源:发表于2020-05-19 09:49 被阅读0次

1.下载插件:

2.下载nodejs:

3.安装nodejs:
(1)解压
(2)配置环境变量

export NODE_HOME=/usr/local/node-v6.9.2-linux-x64

export PATH=$PATH:$NODE_HOME/bin

(3)查看node和npm版本:

node -v

npm -v

4.解压head插件到/opt/module目录下:

unzip elasticsearch-head-master.zip

5.查看当前head插件目录下有无node_modules/grunt目录:

  • 如果没有,执行命令创建:
npm install grunt --save --registry=https://registry.npm.taobao.org

6.安装head插件:

npm install -g cnpm --registry=https://registry.npm.taobao.org

7.安装grunt

npm install -g grunt-cli --registry=https://registry.npm.taobao.org

8.编辑Gruntfile.js

vim Gruntfile.js

文件93行添加:

hostname:'0.0.0.0'

9.检查head根目录下是否存在base文件夹

  • 没有:将 _site下的base文件夹及其内容复制到head根目录下
mkdir base

cp base/* ../base/

10.启动grunt server:

grunt server -d

11.如果提示grunt的模块没有安装:

Local Npm module “grunt-contrib-clean” not found. Is it installed? 

Local Npm module “grunt-contrib-concat” not found. Is it installed? 

Local Npm module “grunt-contrib-watch” not found. Is it installed? 

Local Npm module “grunt-contrib-connect” not found. Is it installed? 

Local Npm module “grunt-contrib-copy” not found. Is it installed? 

Local Npm module “grunt-contrib-jasmine” not found. Is it installed? 

执行命令:

npm install grunt-contrib-clean -registry=https://registry.npm.taobao.org

npm install grunt-contrib-concat -registry=https://registry.npm.taobao.org

npm install grunt-contrib-watch -registry=https://registry.npm.taobao.org 

npm install grunt-contrib-connect -registry=https://registry.npm.taobao.org

npm install grunt-contrib-copy -registry=https://registry.npm.taobao.org 

npm install grunt-contrib-jasmine -registry=https://registry.npm.taobao.org
  • 最后一个模块可能安装不成功,但是不影响使用。

12.浏览器访问head插件:http://192.168.109.133:9100

相关文章

网友评论

      本文标题:Elasticsearch head插件安装

      本文链接:https://www.haomeiwen.com/subject/smevohtx.html