Last active
January 21, 2019 01:11
-
-
Save tinkerware/cf0c47bb69bf42c2d740 to your computer and use it in GitHub Desktop.
Install Latest Java 7 and Java 8 on Ubuntu 14.04 LTS
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
### Fucking Linux | |
It’s 2014, and this is what I had to do to install Java 7 and 8 on latest Ubuntu LTS (Trusty 14.04.1): | |
$ vagrant box add box-cutter/ubuntu1404 && vagrant init box-cutter/ubuntu1404 | |
$ vagrant ssh | |
$ apt-get update && sudo apt-get upgrade | |
$ apt-get software-properties-common | |
$ apt-get install software-properties-common | |
$ add-apt-repository ppa:webupd8team/java | |
$ apt-get update | |
$ apt-get install oracle-java8-installer | |
$ apt-get install oracle-java7-installer | |
$ update-java-alternatives -s java-8-oracle | |
Somehow I think this is a few notches below useful. More gory details are below. | |
<http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html> | |
<http://askubuntu.com/questions/445536/unable-to-locate-package-add-apt-repository-error> |
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
config.vm.provision "shell", inline: <<-SHELL | |
apt-get -y -q update | |
apt-get -y -q upgrade | |
apt-get -y -q install software-properties-common htop | |
add-apt-repository ppa:webupd8team/java | |
apt-get -y -q update | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
apt-get -y -q install oracle-java8-installer | |
apt-get -y -q install oracle-java7-installer | |
update-java-alternatives -s java-8-oracle | |
SHELL | |
# Add the following line inside the block to install Linux perf tools | |
# apt-get -y -q install linux-tools-generic linux-cloud-tools-generic linux-tools-3.13.0-40-generic linux-cloud-tools-3.13.0-40-generic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much