ELK(Elasticsearch6.0以上版本head插件安装)

  参考:https://www.cnblogs.com/Onlywjy/p/Elasticsearch.html

  Elasticsearch6.0不能使用命令直接安装head插件

 

  修改配置文件/etc/elasticsearch/elasticsearch.yml增加参数

# 增加参数,使head插件可以访问es  
http.cors.enabled: true  
http.cors.allow-origin: "*"

  

  下载head插件

wget  https://github.com/mobz/elasticsearch-head/archive/master.zip

  解压至/opt目录下

  

  安装node

wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.4.7-linux-x64.tar.gz
tar -zxvf node-v4.4.7-linux-x64.tar.gz

  

  修改环境变量/etc/profile添加

export NODE_HOME=/opt/node-v4.4.7-linux-x64
export PATH=$PATH:$NODE_HOME/bin
export NODE_PATH=$NODE_HOME/lib/node_modules

  

  设置生效

source /etc/profile

  

  安装grunt

cd /opt/elasticsearch-head-master
npm install -g grunt-cli 

  检查是否安装成功

 

  修改head插件源码/opt/elasticsearch-head-master/Gruntfile.js

  PS:hostname是新增的,不要忘记原有的true后面加,符号

  修改连接地址/opt/elasticsearch-head-master/_site/app.js 

  

  下载运行head必要的文件(放置在文件夹/tmp下)

cd /tmp
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
yum -y install bzip2

  

  运行head

cd /opt/elasticsearch-head-master
npm install 

  后台启动

grunt server &

  

  web页面验证

 

  

转载于:https://www.cnblogs.com/minseo/p/9117470.html

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值