ELK 插件(一) ---- head

01,

  安装 node.js

  wget https://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.xz

  tar xf node-v10.15.1-linux-x64.tar.xz

  vim /etc/profile

  NODE_HOME=/elk/node
  PATH=$PATH:$JAVA_HOME:$NODE_HOME/bin

  

02, 安装grunt

   npm install -g grunt-cli

  [root@elk-master head]# grunt -version
             grunt-cli v1.3.2
03,安装head

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

    unzip master.zip

    

修改elasticsearch-head-master下Gruntfile.js配置文件,添加hostname: '*',

vim Gruntfile.js

  

  更换npm源

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

  使用cnpm安装

  cnpm install

   

 可以选择更改连接的位置

  vim _site/app.js

  

运行完成后执行命令完成后没有报错则进入head 根目录

  grunt server &

   

  

一直存在如下,可选择重启elastichsearch,也可能elasticsearch服务与elasticsearch-head之间可能存在跨越

编辑elasticsearch.yml文件添加内容

  vim config/elasticsearch.yml

    http.cors.enabled: true

    http.cors.allow-origin: "*"

  重启

  

 

  

猜你喜欢

转载自www.cnblogs.com/kingle-study/p/10360412.html
今日推荐