Last active
August 29, 2015 14:24
-
-
Save lmgeorge/9943745289af1abcac7b 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
PRIVATE_IP = "192.168.19.88" | |
BOX_NAME = "trusty64" #custom base box, but ubuntu/trusty64 will work fine | |
Vagrant.configure(2) do |config| | |
config.vm.box = BOX_NAME | |
config.vm.hostname = "trusty64-jdk8" | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = "trusty64-jdk8" | |
vb.cpus = 4 | |
vb.memory = "4096" | |
end | |
config.vm.network "private_network", ip: PRIVATE_IP | |
config.vm.network "public_network" | |
config.vm.provision :shell, inline: <<-SHELL | |
sudo apt-get --yes update | |
sudo apt-get --yes install software-properties-common | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
debconf-set-selections <<< 'oracle-java8-installer shared/accepted-oracle-license-v1-1 select true' | |
sudo apt-get --yes install oracle-java8-installer | |
sudo apt-get --yes install oracle-java8-set-default | |
export JAVA_HOME=/usr/lib/jvm/java-8-oracle | |
export JRE_HOME=$JAVA_HOME/jre | |
export CLASSPATH=$JAVA_HOME/bin:$CLASSPATH | |
export PATH=$PATH:$JAVA_HOME/bin | |
sudo dpkg --configure -a | |
sudo apt-get --yes autoremove | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment