Skip to content

Instantly share code, notes, and snippets.

@zrhans
Forked from r3b/oracle_jdk_install.sh
Created July 19, 2014 05:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zrhans/534d06d181ec0161a4b7 to your computer and use it in GitHub Desktop.
Save zrhans/534d06d181ec0161a4b7 to your computer and use it in GitHub Desktop.
# Add the Oracle JDK Repos
UBUNTU_VERSION=precise
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu ${UBUNTU_VERSION} main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu ${UBUNTU_VERSION} main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
DEBIAN_FRONTEND="noninteractive" apt-get update
# Accept the Oracle License
echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 boolean true" > /tmp/oracle-license-debconf
/usr/bin/debconf-set-selections /tmp/oracle-license-debconf
rm /tmp/oracle-license-debconf
# Install Oracle JDK 7
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install oracle-java7-installer oracle-java7-set-default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment