반응형
jdk 설치 스크립트(oracle)
mkdir -p /home/ubuntu/app \
&& cd /home/ubuntu/app \
&& wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn/java/jdk/8u211-b12/478a62b7d4e34b78b671c754eaaf38ab/jdk-8u211-linux-x64.tar.gz" \
&& tar xvfz jdk-*.tar.gz \
&& rm jdk-*.tar.gz \
&& ln -s /home/ubuntu/app/jdk* jdk
jdk 설치 스크립트(openjdk)
mkdir -p /home/ubuntu/app \
&& cd /home/ubuntu/app \
&& wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz \
&& tar xvfz openjdk-*.tar.gz \
&& rm openjdk-*.tar.gz \
&& ln -s /home/ubuntu/app/jdk-* jdk
환경변수 설정
sudo vi ~/.profile
export JAVA_HOME=/home/ubuntu/app/jdk
export PATH=$PATH:$JAVA_HOME/bin
환경변수 설정 적용
source ~/.profile
설치 확인
java -version
반응형
'Development > Java' 카테고리의 다른 글
[Java] Json Handling(with Jackson) (0) | 2019.03.20 |
---|---|
[Java] HTML 파싱 (0) | 2019.03.20 |
[Java] Garbage Collector (0) | 2018.07.24 |
[Java] logback, slf4j (0) | 2018.07.15 |
[Java] log4j (0) | 2018.07.15 |