jdk安装脚本

####### 安装jdk

yum install -y java-1.8.0-openjdk  java-1.8.0-openjdk-devel.x86_64
ls -lrt /usr/bin/java 
cat <<'EOF' > /etc/profile.d/jdk.sh
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.275.b01-0.el7_9.x86_64
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH
EOF
source /etc/profile