Last active
June 15, 2016 11:35
-
-
Save sthum/ab15c3ee5a8956d9d12307ca60e94819 to your computer and use it in GitHub Desktop.
Oracle Java 8 Installation which sets the licence agreement in advance. This way this procedure can be included in any automated installation. I did use this in a packer build.
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
sudo apt-get update | |
# make add-apt-repository available | |
sudo apt-get install -y software-properties-common python-software-properties | |
## add java 8 repo | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
# setting to automatically accept the licence to prevent the prompt | |
sudo echo debconf shared/accepted-oracle-license-v1-1 select true | \ | |
sudo debconf-set-selections | |
sudo echo debconf shared/accepted-oracle-license-v1-1 seen true | \ | |
sudo debconf-set-selections | |
# install java 8 and set defaults | |
sudo apt-get install -y oracle-java8-installer | |
sudo apt-get install -y oracle-java8-set-default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment