본문 바로가기

퍼블릭 클라우드

[aws] ec2 인스턴스에 java 설치하기

728x90

ec2 인스턴스에 java 설치하기

sdk 설치

curl -s "https://get.sdkman.io" | bash


Looking for a previous installation of SDKMAN...
Looking for unzip...
Looking for zip...
Looking for curl...
Looking for sed...
Installing SDKMAN scripts...
Create distribution directories...
Getting available candidates...
Prime the config file...
Installing script cli archive...
* Downloading...
######################################################################## 100.0%
* Checking archive integrity...
* Extracting archive...
* Copying archive contents...
* Cleaning up...

* Downloading...
######################################################################## 100.0%
* Checking archive integrity...
* Extracting archive...
* Copying archive contents...
* Cleaning up...

Set version to 5.16.0 ...
Set native version to 0.0.15 ...
Attempt update of interactive bash profile on regular UNIX...
Added sdkman init snippet to /root/.bashrc
Attempt update of zsh profile...
Updated existing /root/.zshrc



All done!


You are subscribed to the STABLE channel.

Please open a new terminal, or run the following in the existing one:

    source "/root/.sdkman/bin/sdkman-init.sh"

Then issue the following command:

    sdk help

Enjoy!!!
source "/root/.sdkman/bin/sdkman-init.sh"
sdk version
$ sdk version
==== BROADCAST =================================================================
* 2022-12-20: vertx 4.3.7 available on SDKMAN!
* 2022-12-20: quarkus 2.13.6.Final available on SDKMAN! https://github.com/quarkusio/quarkus/releases/tag/2.13.6.Final
* 2022-12-20: micronaut 3.7.5 available on SDKMAN!
================================================================================

SDKMAN 5.16.0

java 설치(jdk 배포판 설치)

sdk list java

sdk install java 19.0.1-amzn
$ sdk install java 19.0.1-amzn

Downloading: java 19.0.1-amzn

In progress...

###################################################################################### 100.0%

Repackaging Java 19.0.1-amzn...

Done repackaging...

Installing: java 19.0.1-amzn
Done installing!


Setting java 19.0.1-amzn as default.

 

참고 URL

- sdk 설치 : https://sdkman.io/install

- jdk 배포판 : https://sdkman.io/jdks

 

728x90