Skip to content

Instantly share code, notes, and snippets.

@rodolfo42
Created August 7, 2013 04:47
Show Gist options
  • Save rodolfo42/6171252 to your computer and use it in GitHub Desktop.
Save rodolfo42/6171252 to your computer and use it in GitHub Desktop.
install JDK 6 on default Amazon AMI
#!/bin/bash
wget --no-cookies --header "Cookie: gpw_e24=xxx;" http://download.oracle.com/otn-pub/java/jdk/6u34-b04/jdk-6u34-linux-i586-rpm.bin
chmod +x jdk-6u34-linux-i586-rpm.bin
./jdk-6u34-linux-i586-rpm.bin
alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000
update-alternatives --config java
ln -s /usr/java/default/jre /usr/lib/jvm/jre
ln -s /usr/share/java /usr/lib/jvm-exports/jre
@rodolfo42
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment