Skip to content

Instantly share code, notes, and snippets.

@tuxpower
Last active August 24, 2016 15:06
Show Gist options
  • Save tuxpower/0262afd0939d199c2e0f34f0417185c3 to your computer and use it in GitHub Desktop.
Save tuxpower/0262afd0939d199c2e0f34f0417185c3 to your computer and use it in GitHub Desktop.
Oracle Java 8 unattended linux installation
#!/usr/bin/env bash
# Dear Oracle: I know you employ more lawyers than engineers, but FFS please just make it possible to download that package with a simple curl or wget.
# Oh, and the fact that the certificate is invalid means that if this did come to a lawsuit, people would just claim that a MITM attack forged their agreement to the licence.
wget -q --no-cookies --no-check-certificate --header \
"Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u102-b14/jdk-8u102-linux-x64.rpm"
sudo yum localinstall -y jdk-8u102-linux-x64.rpm
sudo ln -sf /usr/java/jdk1.8.0_102 /usr/java/jdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment