Created
January 22, 2012 17:00
-
-
Save rubic/1657678 to your computer and use it in GitHub Desktop.
Portable method to install Java on Ubuntu cloud images
This file contains hidden or 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
cloud-init: ############################################################## | |
#cloud-config | |
apt_upgrade: true | |
apt_sources: | |
- source: "ppa:sun-java-community-team/sun-java6" | |
user-script: ############################################################# | |
#!/bin/sh | |
DISTRIB_CODENAME=`lsb_release -s --codename` | |
apt-get -y install openjdk-6-jre-headless | |
mirror=http://us.ec2.archive.ubuntu.com/ubuntu/ | |
printf "%%s\\n%%s\\n" "deb ${mirror} $DISTRIB_CODENAME multiverse" "deb-src ${mirror} $DISTRIB_CODENAME multiverse" | tee /etc/apt/sources.list.d/multiverse.list | |
apt-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment