ES集群head插件部署

部署head监控插件
  1. 安装node
wget https://npm.taobao.org/mirrors/node/latest-v15.x/node-v15.8.0-linux-x64.tar.gz
tar -xzvf node-v15.8.0-linux-x64.tar.gz -C /usr/local/
cd /usr/local
mv node-v15.8.0-linux-x64 node 
cat vim /etc/profile.d/node.sh
export NODE_HOME=/usr/local/node
export PATH=$NODE_HOME/bin:$PATH
source /etc/profile.d/node.sh
node --version   #检查node版本号
  1. 下载head插件
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
unzip –d /usr/local elasticsearch-head-master.zip
  1. 安装grunt
cd /usr/local/elasticsearch-head-master
yum -y install npm
npm install -g grunt-cli
grunt –-version  #检查grunt版本号
  1. 修改head源码
    vi /usr/local/elasticsearch-head-master/Gruntfile.js (95左右)

在这里插入图片描述
添加hostname,注意在上一行末尾添加逗号,hostname 不需要添加逗号
vi /usr/local/elasticsearch-head-master/_site/app.js (4360左右)
在这里插入图片描述
原本是http://localhost:9200 ,如果head和ES不在同一个节点,注意修改成ES的IP地址

  1. 下载head必要的文件
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
yum -y install bzip2
tar -jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /tmp/
  1. 运行head
方法一:yum -y install fontconfig 
cd /tmp/phantomjs-2.1.1-linux-x86_64/bin
mv phantomjs /usr/bin/
方法二:cd /usr/local/elasticsearch-head-master/
npm install
nohup grunt server &
  1. 测试
    在这里插入图片描述
    url:http://192.168.24.46:9100/?auth_user=*&auth_password=
    es配置文件见:
    https://blog.csdn.net/weixin_45717886/article/details/116944391
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值