Forked from sr75/wget-jdk-oracle-install-example.txt
Last active
April 5, 2016 03:22
-
-
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
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 | |
# 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