LoginSignup
3
3

More than 5 years have passed since last update.

Oracle JDK on EC2 Linux

Last updated at Posted at 2013-06-10

Amazon Linux AMI だとOpenJDKがインストールされている。
Sun/Oracle JDKにに変えたい。

こちらを参考にJDKを直接ダウンロード

wget wget --no-cookies --header "Cookie: gpw_e24=xxx;" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64-rpm.bin
$ chmod +x /jdk-6u45-linux-x64-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

profileを書き換え

$ sed -i 's/\/usr\/lib\/jvm\(\/jre\)*/\/usr\/java\/jdk1.6.0_45/g' /etc/java/java.conf /etc/profile.d/aws-apitools-common.sh
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3