Created
September 23, 2014 13:33
-
-
Save fdimuccio/5f163b25d2ac6832e68d to your computer and use it in GitHub Desktop.
Oracle JDK Amazon EC2 installer
This file contains hidden or 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
| #!/usr/bin/env bash | |
| ORACLE_JDK='http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.rpm' | |
| JDK_FILENAME=/home/ec2-user/jdk-linux-x64.rpm | |
| #if [ ! -f $JDK_FILENAME ] | |
| #then | |
| wget -O $JDK_FILENAME --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" $ORACLE_JDK | |
| rpm -Uvh $JDK_FILENAME | |
| alternatives --install /usr/bin/java java /usr/java/default/bin/java 3 | |
| alternatives --set java /usr/java/default/bin/java | |
| #fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment