Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sodre/540866e8ee56b26197689de4fb05792c to your computer and use it in GitHub Desktop.
Save sodre/540866e8ee56b26197689de4fb05792c to your computer and use it in GitHub Desktop.
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
#!/bin/bash
# http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u77-b03/server-jre-8u77-solaris-x64.tar.gz" \
-O jdk.tar.gz
mkdir -p /opt/local/java
tar -C /opt/local/java -xzvf jdk.tar.gz && rm -f jdk.tar.gz
rm -f /opt/local/java/oracle-jdk8 && ln -s jdk1.8.0_77 /opt/local/java/oracle-jdk8
echo "export JAVA_HOME=/opt/local/java/oracle-jdk8" >> /etc/profile
chown root:root -R /opt/local/java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment