1) IBM SDK 7 설치
https://developer.ibm.com/javasdk/downloads/sdk7r1/
Linux on Power Systems 64-bit LE
Installable package (InstallAnywhere as root)
(File name: ibm-java-ppc64le-sdk-7.1-4.5.bin, Size: 128MB)
u0017496@sys-87548:~$ chmod a+x ibm-java-ppc64le-sdk-7.1-4.5.bin
u0017496@sys-87548:~$ sudo ./ibm-java-ppc64le-sdk-7.1-4.5.bin
...
===============================================================================
Installation Complete
---------------------
Congratulations. IBM 64-bit SDK for Linux, Java Technology Edition, Version 7.1
has been successfully installed to:
/opt/ibm/java-ppc64le-71
PRESS <ENTER> TO EXIT THE INSTALLER:
설치 directory가 아래와 같으므로, user profile의 PATH의 맨 앞에 다음과 같이 설정해서 쓰시면 됩니다.
u0017496@sys-87548:~$ export PATH=/opt/ibm/java-ppc64le-71/bin:$PATH
u0017496@sys-87548:~$ which java
/opt/ibm/java-ppc64le-71/bin/java
u0017496@sys-87548:~$ java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pxl6470_27sr4fp5-20170421_02(SR4 FP5))
IBM J9 VM (build 2.7, JRE 1.7.0 Linux ppc64le-64 Compressed References 20170406_343211 (JIT enabled, AOT enabled)
J9VM - R27_Java727_SR4_20170406_2107_B343211
JIT - tr.r13.java_20170406_343211
GC - R27_Java727_SR4_20170406_2107_B343211_CMPRSS
J9CL - 20170406_343211)
JCL - 20170420_01 based on Oracle jdk7u141-b11
2) openJDK 7 설치
Ubuntu 16에는 JDK7이 지원되지 않습니다만, 아래와 같이 PPA repository에서 제공되기는 합니다. 다만, 이 설치 과정 중에 Oracle installer를 download 받아서 그걸 이용하는 과정이 있는데, ppc64le는 Oracle과 친하지 않아 그 과정은 실패합니다. 그러나 그와는 무관하게 JDK7은 설치되고 사용할 수 있습니다.
u0017496@sys-87548:~$ sudo add-apt-repository ppa:openjdk-r/ppa
More info: https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpgyngeisu/secring.gpg' created
gpg: keyring `/tmp/tmpgyngeisu/pubring.gpg' created
gpg: requesting key 86F44E2A from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpgyngeisu/trustdb.gpg: trustdb created
gpg: key 86F44E2A: public key "Launchpad OpenJDK builds (all archs)" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
u0017496@sys-87548:~$ sudo apt-get update
u0017496@sys-87548:~$ apt-cache pkgnames | grep openjdk-7
openjdk-7-jre-zero
openjdk-7-jre-lib
openjdk-7-source
oracle-jdk7-installer
openjdk-7-demo
openjdk-7-jre-headless
openjdk-7-dbg
openjdk-7-doc
openjdk-7-jdk
openjdk-7-jre
u0017496@sys-87548:~$ sudo apt-get install openjdk-7-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
at-spi2-core dbus-x11 gconf-service gconf-service-backend gconf2 gconf2-common libatk-bridge2.0-0
libatk-wrapper-java libatk-wrapper-java-jni libatspi2.0-0 libavahi-glib1 libbonobo2-0
libbonobo2-common libcanberra0 libgconf-2-4 libgnome-2-0 libgnome2-common libgnomevfs2-0
libgnomevfs2-common liborbit-2-0 libsctp1 libtdb1 libvorbisfile3 libxaw7 libxcb-shape0 libxft2
libxmu6 libxpm4 libxv1 libxxf86dga1 openjdk-7-jre openjdk-7-jre-headless sound-theme-freedesktop
x11-utils
Suggested packages:
gconf-defaults-service libbonobo2-bin libcanberra-gtk0 libcanberra-pulse desktop-base
libgnomevfs2-bin libgnomevfs2-extra gamin | fam gnome-mime-data lksctp-tools openjdk-7-demo
openjdk-7-source visualvm libnss-mdns sun-java6-fonts fonts-ipafont-gothic fonts-ipafont-mincho
ttf-wqy-microhei | ttf-wqy-zenhei fonts-indic mesa-utils
The following NEW packages will be installed:
at-spi2-core dbus-x11 gconf-service gconf-service-backend gconf2 gconf2-common libatk-bridge2.0-0
libatk-wrapper-java libatk-wrapper-java-jni libatspi2.0-0 libavahi-glib1 libbonobo2-0
libbonobo2-common libcanberra0 libgconf-2-4 libgnome-2-0 libgnome2-common libgnomevfs2-0
libgnomevfs2-common liborbit-2-0 libsctp1 libtdb1 libvorbisfile3 libxaw7 libxcb-shape0 libxft2
libxmu6 libxpm4 libxv1 libxxf86dga1 openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless
sound-theme-freedesktop x11-utils
0 upgraded, 35 newly installed, 0 to remove and 39 not upgraded.
1 not fully installed or removed.
Need to get 54.6 MB of archives.
After this operation, 91.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/main ppc64el libbonobo2-common all 2.32.1-3 [34.7 kB]
Get:2 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu xenial/main ppc64el openjdk-7-jre-headless ppc64el 7u95-2.6.4-3 [38.6 MB]
...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Please report to author unsupported platform 'ppc64le'.
Proceeding without web browser plugin support
Please report to author unsupported platform 'ppc64le'.
Proceeding without web browser plugin support
...
AuthParam=1497491097_5726d7e0ebd89a8675567ef8793c3443 [following]
--2017-06-14 21:42:57-- http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-linux-.tar.gz?AuthParam=1497491097_5726d7e0ebd89a8675567ef8793c3443
Connecting to download.oracle.com (download.oracle.com)|65.158.47.80|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-06-14 21:42:57 ERROR 404: Not Found.
download failed
Oracle JDK 7 is NOT installed.
...
Setting up gconf2 (3.2.6-3ubuntu6) ...
Setting up libgnomevfs2-common (1:2.24.4-6.1ubuntu1) ...
Setting up libgnomevfs2-0:ppc64el (1:2.24.4-6.1ubuntu1) ...
Setting up libgnome2-common (2.32.1-5ubuntu1) ...
Setting up libgnome-2-0:ppc64el (2.32.1-5ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
그러나 이는 oracle-java7-installer의 error일 뿐, JDK 7 자체는 설치가 된 것이며 사용 가능합니다.
u0017496@sys-87548:~$ dpkg -l | grep jdk-7
ii openjdk-7-demo 7u95-2.6.4-3 ppc64el Java runtime based on OpenJDK (demos and examples)
ii openjdk-7-jdk:ppc64el 7u95-2.6.4-3 ppc64el OpenJDK Development Kit (JDK)
ii openjdk-7-jre:ppc64el 7u95-2.6.4-3 ppc64el OpenJDK Java runtime, using Hotspot JIT
ii openjdk-7-jre-headless:ppc64el 7u95-2.6.4-3 ppc64el OpenJDK Java runtime, using Hotspot JIT (headless)
다음과 같이 JDK 명령어들도 잘 설치된 것을 보실 수 있습니다.
u0017496@sys-87548:~$ dpkg -L openjdk-7-jdk | grep bin
/usr/lib/jvm/java-7-openjdk-ppc64el/bin
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/serialver
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/native2ascii
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jps
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/extcheck
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/javadoc
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jcmd
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jstatd
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jstack
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jsadebugd
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jarsigner
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/javah
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jmap
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/xjc
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jdb
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/javac
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jstat
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/idlj
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/wsimport
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jinfo
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/javap
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/appletviewer
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/rmic
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/schemagen
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jhat
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/wsgen
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jrunscript
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jar
/usr/lib/jvm/java-7-openjdk-ppc64el/bin/jconsole
이 JDK7을 이용하려면 위의 IBM java SDK처럼 PATH 환경 변수를 조정하여 사용할 수도 있고, 이건 openjdk이므로 'update-alternatives --config java' 명령으로 아래처럼 link를 바꿔줄 수도 있습니다.
u0017496@sys-87548:~$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
u0017496@sys-87548:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-8-openjdk-ppc64el/jre/bin/java 1081 auto mode
1 /usr/lib/jvm/java-7-openjdk-ppc64el/jre/bin/java 1071 manual mode
2 /usr/lib/jvm/java-8-openjdk-ppc64el/jre/bin/java 1081 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/lib/jvm/java-7-openjdk-ppc64el/jre/bin/java to provide /usr/bin/java (java) in manual mode
위에서처럼 1번을 택해서 JDK8 대신 JDK7을 택한 뒤, java 명령을 내리면 아래처럼 버전 7이 link되어 있음을 확인할 수 있습니다.
u0017496@sys-87548:~$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-3)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
댓글 없음:
댓글 쓰기