#!/bin/bash
echo "安装jdk8,按任意键继续"
read -n1
yum install wget
mkdir -p /data/software
cd /data/software
curl -O http://down.yadeaiot.net:8000/jdk-8u221-linux-x64.rpm
rpm -ivh /data/software/jdk-8u221-linux-x64.rpm
echo '#set java environment
JAVA_HOME=/usr/java/jdk1.8.0_221-amd64
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/toos.jar
export JAVA_HOME CLASSPATH PATH' >>/etc/profile
source /etc/profile
java -version
