how to install jdk or java on centos 7
2019. 6. 25. 20:47ㆍOS/리눅스
반응형
yum -y update
yum install java-1.8.0-openjdk
yum install java-1.8.0-openjdk -y
java -version
update-alternatives --config java
vi .bash_profile
### 하단에 추가 ###
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java
### java -version 으로 나오는 버전을 export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk 뒤에 삽입해야함
source .bash_profile
echo $JAVA_HOME
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/bin/java
반응형
'OS > 리눅스' 카테고리의 다른 글
ubuntu apt-get error (0) | 2019.07.01 |
---|---|
how to install facebook-ctf(fbctf) on ubuntu-16.04(Xenial Xerus) with docker (1) | 2019.06.26 |
how to install docker on ubuntu 16.04 / 18.04 (0) | 2019.06.21 |
Linux binary (0) | 2019.04.04 |
ubuntu-16.04(Xenial Xerus) -> ubuntu-18.04(Bionic Beaver) (0) | 2019.04.04 |