Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkuchiki/8816128 to your computer and use it in GitHub Desktop.
Save tkuchiki/8816128 to your computer and use it in GitHub Desktop.
install Java
MAJOR_VERSION=7
MINOR_VERSION=51
MAJOR_MINOR_VERSION="${MAJOR_VERSION}u${MINOR_VERSION}"
REVISION=13
COOKIE="gpw_e24=http%3A%2F%2Fwww.oracle.com"
#RPM="jdk-${MAJOR_VERSION}-linux-x64.rpm"
#URI="http://download.oracle.com/otn-pub/java/jdk/${MAJOR_VERSION}/${RPM}"
RPM="jdk-${MAJOR_VERSION}u${MINOR_VERSION}-linux-x64.rpm"
VERSION_DIR="${MAJOR_MINOR_VERSION}-b${REVISION}"
URI="http://download.oracle.com/otn-pub/java/jdk/${VERSION_DIR}/${RPM}"
curl -b $COOKIE -L $URI -O
rpm -ivh $RPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment