elasticsearch-head-master.zip安装脚本(数据可视化插件)

#! /bin/bash
#安装环境:
#已经安装有elasticsearch
#上传elasticsearch-head-master.zip到/opt下
#一般和elasticsearch的master装在一起
cd /opt
yum install -y unzip wget
#安装nose.js
wget https://nodejs.org/dist/latest-v10.x/node-v10.24.1-linux-x64.tar.gz
tar -xvhf node-v10.24.1-linux-x64.tar.gz
mv node-v10.24.1-linux-x64 /usr/local/node
#添加环境变量
echo "###############################"
echo 'export NODE_HOME=/usr/local/node' >>/etc/profile
echo 'export PATH=$NODE_HOME/bin:$PATH' >>/etc/profile
source /etc/profile

unzip /opt/elasticsearch-head-master.zip
cd /opt/elasticsearch-head-master
#npm改taobao源
npm config set registry https://registry.npm.taobao.org
npm install
npm -g install [email protected] --ignore-script
#启动即可访问9100端口
npm run start

你可能感兴趣的:(脚本,elasticsearch)