Created
October 7, 2017 22:30
-
-
Save yonglai/8aeeadd8823f7665f965de714a26498f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo install jdk1.8 | |
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.rpm | |
yum localinstall jdk-8u144-linux-x64.rpm -y | |
touch /etc/profile.d/java.sh | |
export JAVA_HOME='/usr/java/jdk1.8.0_144' | |
cat <<EOT > /etc/profile.d/java.sh | |
export JAVA_HOME="$JAVA_HOME" | |
export JAVA_PATH="$JAVA_HOME" | |
export PATH="$PATH:$JAVA_HOME" | |
EOT | |
rm jdk-8u144-linux-x64.rpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment