脚本系列之jdk安装脚本

#!/bin/bash
tar -xvf /usr/jdk/jdk-8u91-linux-x64.tar.gz
cd /usr/jdkint/jdk1*
home=`pwd`
echo $home
echo "JAVA_HOME=${home}" >>/etc/profile
echo "CLASSPATH=\$JAVA_HOME/lib" >> /etc/profile
echo "PATH=\$PATH:\$JAVA_HOME/bin" >> /etc/profile
 
source /etc/profile
posted @ 2019-04-10 13:36  lin819747263  阅读(140)  评论(0编辑  收藏  举报