Last active
July 12, 2016 15:23
-
-
Save kanuku/1e61eaa06c44013c22f528ef581b12ea to your computer and use it in GitHub Desktop.
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/sh | |
############################################## | |
# Install script Java on Jenkins | |
# for debian, ubuntu, and centos | |
# | |
# | |
############################################## | |
JAVA_VERSION="8u92" | |
BUILD_NUMBER="b14" | |
if [ ! -f jdk-$JAVA_VERSION-linux-x64.tar.gz ]; then | |
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_NUMBER/jdk-$JAVA_VERSION-linux-x64.tar.gz | |
#Remove if folders exists | |
rm -fr jdk1.8.0_92 /server/jdk/jdk1.8.0_92 | |
#Unzip | |
tar zxvf jdk-$JAVA_VERSION-linux-x64.tar.gz | |
#Move java folders beside other folders | |
sudo mv jdk1.8.0_92 /server/jdk/ | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment