JDK及elasticsearch-head插件安装

#########JDK#############

#!/bin/bash
yum remove jdk -y
wget http://192.168.3.200/rpm/jdk-8u151-linux-x64.rpm
rpm -ivh jdk-8u151-linux-x64.rpm
echo "
export JAVA_HOME=/usr/java/jdk1.8.0_151
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH" >>/etc/profile
source /etc/profile

#########################elasticsearch-head#####################

#!/bin/bash
####主机ip
hostip="192.168.100.100"
##创建插件目录
mkdir /es-head
##进入到目录
cd /es-head/
##下载head包
wget  https://github.com/mobz/elasticsearch-head/archive/master.zip
##安装unzip命令
yum install unzip -y
###部署node
wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.4.7-linux-x64.tar.gz
tar  -xf  node-v4.4.7-linux-x64.tar.gz
echo "export PATH=/es-head/node-v4.4.7-linux-x64/bin:$PATH" >> /etc/profile
source /etc/profile
###进入head目录,安装grunt
cd elasticsearch-head-master/
sed -i "s/localhost/${hostip}/g" _site/app.js
##下载运行head必要的文件(放置在文件夹/tmpi)
cd /tmp/
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
cd /es-head/elasticsearch-head-master
npm  install

###启动
nohup  npm run start  &

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值