Obsidian/Recognition/Programing/Linux/CentOS/CentOS Java 설치.md

18 lines
481 B
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

```Shell
# JDK 설치 가능한 버전 확인
yum list java*jdk
# JDK 1.8 설치
yum install -y java-1.8.0-openjdk.x86_64
# java 설치 경로를 확인 (맨위의 폴더)
ls -l /usr/lib/jvm/
# 환경변수 설정 (파일의 맨 하단에 추가)
vi /etc/profile
> export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.el7_6.x86_64
> export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64
# 환경변수 반영
source /etc/profile
```