10.headmaster和nodejs安装

headMaster安装

  1. 将文件移动到opt/install/elk中
    在这里插入图片描述

  2. 将elasticsearch-head-master.zip文件解压到opt/bigdata/elk中

unzip elasticsearch-head-master.zip -d /opt/bigdata/elk
  1. 重命名 将elasticsearch-head-master为eshm
mv elasticsearch-head-master

Nodejs安装

  1. 通过xftp将文件放到/opt/install/elk下面
node-v8.9.1-linux-x64.tar.gz
  1. 将文件解压到指定的路径
tar -xzvf node-v8.9.1-linux-x64.tar.gz -C /opt/bigdata/elk
  1. 将文件重命名
mv node-v8.9.1-linux-x64/ nodejs891
  1. 修改环境变量
vi /etc/profileexport 
NODE_HOME=/opt/bigdata/elk/nodejs891export 
PATH=$NODE_HOME/bin:$PATH
  1. 刷新环境变量
source /etc/profile
  1. 测试是否成功
node -v

在这里插入图片描述

  1. 踩坑
    我之前一直用的node-v8.11.1-linux-x64.tar版本,一直报错node: relocation error: node: symbol , version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
    后来我换成node-v14.5.0-linux-s390x.tar一直报错
    -bash: /opt/bigdata/elk/nodejs1450/bin/node: cannot execute binary file
    再后来换成node-v8.9.1-linux-x64.tar.gz就正常了可能与系统差异有关
  2. 准备
    ①切换国内镜像:
npm config set registry https://registry.npm.taobao.org

②验证镜像设置是否成功:

npm config get registry

③在eshm根目录下

npm install
  1. eshm目录下grunt工具包安装
    ①安装grunt客户端工具:
npm install -g grunt-cli

②检查当前目录下npm的安装情况:

npm list --depth=0
[root@vbserver04 eshm]# npm list --depth=0
elasticsearch-head@0.0.0 /opt/bigdata/elk/eshm
├── grunt@1.0.1
├── grunt-contrib-clean@1.0.0
├── grunt-contrib-concat@1.0.1
├── grunt-contrib-connect@1.0.2
├── grunt-contrib-copy@1.0.0
├── grunt-contrib-jasmine@1.0.3
├── grunt-contrib-watch@1.0.0
├── grunt-karma@2.0.0
├── http-proxy@1.16.2
── karma@1.3.0
  1. 启动grunt
    在eshm根目录下:
    正常启动:
    npm run start
    后台启动:
    nohup grunt server &
    记录pid, 通过:kill -9 pid 关闭进程
  2. 访问
    http://(虚拟机地址):9100
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44695793/article/details/108024935