centos7 安装 elasticsearch head 插件 elasticsearch6.x

1配置环境node

下载node地址:https://nodejs.org/en/download/

其他系统的安装教程在:https://nodejs.org/en/download/package-manager/

主流的几个系统(Debian and Ubuntu based Linux distributions, Enterprise Linux/Fedora(centos) and Snap packages):https://github.com/nodesource/distributions/blob/master/README.md

NodeJS 11.x
curl -sL https://rpm.nodesource.com/setup_11.x | bash -
NodeJS 10.x
curl -sL https://rpm.nodesource.com/setup_10.x | bash -
NodeJS 8.x
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
NodeJS 6.x
curl -sL https://rpm.nodesource.com/setup_6.x | bash -

编译上面的文件需要用到的工具 (推荐:yum groupinstall 'Development Tools')

yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'

查看对应的版本

node -v
npm -v

2.下载head 文件

yum install –y git
git clone https://github.com/mobz/elasticsearch-head.git

3.安装  grunt

cd elasticsearch-head
npm install -g grunt --registry=https://registry.npm.taobao.org

4.安装插件

npm install 

如果node_modules/grunt 没有二进制文件这执行

npm install grunt --save 

5修改配置文件Gruntfile.js

在hostname添加elasticsearch-head地址

a.vim Gruntfile.js

hostname: '0.0.0.0',

b.vim ./_site/app.js
将localhost修改为ESdeIP地址
修改前:this.base_uri = this.config.base_uri;
修改后: this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://you ip address:9200";
 

6.运行插件

npm run start ( or ./node_modules/grunt/bin/grunt server)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值