Elasticsearch head插件安装

2020-05-19  本文已影响0人  Movle

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文件夹

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

上一篇 下一篇

猜你喜欢

热点阅读