2015-05-13

Oracle Linux & Oracle Solutions tips

Oracle Linux에서 Yum으로 update하고 나서 Oracle Linux의 version을 알고 싶을때:
  more /etc/system-release or more /etc/oracle-release
  update된 version을 알 수가 있습니다.

최신 JDK를 rpm으로 설치를 했을 때 설치된 directory는 어디:
  /usr/java/jdk1.8.0_45    ; OracleJDK
  /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/   ; OpenJDK

Open JDK와 Oracle JDK를 모두 설치했을 때 선택적으로 java를 실행하고 싶다면:
(Open JDK에서 Oracle JDK로 link 변경)
  # java -version
  java version "1.7.0_79"
  OpenJDK Runtime Environment (rhel-2.5.5.1.0.1.el6_6-x86_64 u79-b14)
  OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

  # which java
  /usr/bin/java

  # ls -al /usr/bin/java
  lrwxrwxrwx 1 root root 22 May 13 14:22 /usr/bin/java -> /etc/alternatives/java

  # ls -al /etc/alternatives/java
  lrwxrwxrwx 1 root root 46 May 13 14:22 /etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java

  # ln -s /usr/java/jdk1.8.0_45/bin/java /usr/bin/java

  # java -version
  java version "1.8.0_45"
  Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)