Created
February 1, 2018 10:24
-
-
Save yarinkos/8280eb9941183884276c9872823659f8 to your computer and use it in GitHub Desktop.
Java 8 installation Centos 7
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 | |
cd /opt/ | |
wget --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/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz" | |
tar xzf jdk-8u161-linux-x64.tar.gz | |
echo 'export JAVA_HOME=/opt/jdk1.8.0_161 | |
export JRE_HOME=/opt/jdk1.8.0_161/jre | |
export PATH=$PATH:/opt/jdk1.8.0_161/bin:/opt/jdk1.8.0_161/jre/bin' >> /etc/environment | |
source /etc/environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment