-
https://thinmug.tistory.com/22
[CentOS 7] 리눅스 java 설치, 환경변수 설정
자바 설치 CentOS7에는 기본적으로 java가 설치되어 있다. 하지만 개발버전이 빠져있단다. 그래서 다시 설치하겠다. 이번에는 yum을 통해 다운받을 생각이다. 먼저 yum list java*jdk-devel 로 다운받을 수
thinmug.tistory.com
- yum 최신화하기
yum update
- 다운받을 수 있는 자바 버전을 확인
yum list java*jdk-devel
- 설치
yum install java-1.8.0-openjdk-devel.x86_64
- 설치된 위치 확인
which javac
- 환경변수 설정
vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-devel.x86_64export PATH=$JAVA_HOME/bin:$PATHexport JAVA_OPTS=Dfile.encoding=UTF-8export CLASSPATH="."- 적용하기
source /etc/profile
- 재부팅
reboot
yum 설치중 다른 것 실행시 lock이 풀릴 때 까지 기다림..
Another app is currently holding the yum lock; waiting for it to exit...
'프로젝트' 카테고리의 다른 글
spring boot micrometer 구현(actuator, prometheus) (0) 2023.04.19 서버에 스프링 애플리케이션 띄우기(scp, CentOS) (0) 2023.03.14 Ncloud) 간단하게 테스트서버 생성, 접속해보기 (classic, Centos) (0) 2023.03.13 jpa dto와 entity 빌더 패턴으로 변환하기 (0) 2023.03.11 Github Actions 설정하며 겪은 문제들 (gradle) (0) 2023.03.10 댓글