JDK 설치

OS, package manager 별 OpenJDK 설치 방법(Azul 사의 Zulu JDK 권장)

TOC

Windows - Scoop

scoop bucket add java

JDK 8

OpenJDK 8

scoop install openjdk8

AdoptJDK 8 with HotSpot

scoop install adopt8-hotspot

Zulu 8

scoop install zulu8

Centos 7

Azul 사의 Zulu OpenJDK

$ sudo rpm --import http://repos.azulsystems.com/RPM-GPG-KEY-azulsystems
$ sudo curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.repo

Zulu 패키지 목록 확인

$ sudo yum list zulu*

Available Packages
zulu-10.x86_64                                       10.3+5-1                                 zulu
zulu-11.x86_64                                       11.2+3-1                                 zulu
zulu-6.x86_64                                        6.22.0.3-1                               zulu
zulu-7.x86_64                                        7.25.0.5-1                               zulu
zulu-8.x86_64                                        8.33.0.1-1                               zulu
zulu-9.x86_64                                        9.0.7.1-1                                zulu

설치하려면 Zulu 버전 설치(EX: 8)

$ sudo yum install zulu-8

설치 경로

/usr/lib/jvm/zulu-{version} 에 설치됨(예: zulu-8의 경우

AdoptJDK

$ wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u202b08.tar.gz
$ sudo mkdir -p /usr/java
$ tar ztvf OpenJDK8U-jdk_x64_linux_hotspot_8u202b08.tar.gz -C /usr/java/
$ sudo ln -s /usr/java/jdk8u202-b08 /usr/java/adoptjdk-8
$ export JDK_HOME=/usr/java/adoptjdk-8
$ export PATH=${JDK_HOME}/bin:$PATH

Ubuntu 18 LTS

  • import Azul's public key.

     $ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
  • Add APT repository

     $ sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
  • Update the information

     $ sudo apt update
  • list zulu packages

     $ sudo apt-cache search zulu-
  • Install package

     $ sudo apt install zulu-8

Last updated