jak rpm安装实现

wget   https://download.oracle.com/otn/java/jdk/8u211-b12/478a62b7d4e34b78b671c754eaaf38ab/jdk-8u211-linux-i586.rpm

rpm -ivh dk-8u211-linux-i586.rpm

java -version 

 

[root@bogon jdk1.8.0_172-i586]# clear
[root@bogon jdk1.8.0_172-i586]# java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) Client VM (build 25.172-b11, mixed mode, sharing)
配置java home

vi  /etc/profile.d/java.sh

#java home

JAVA_HOME=/usr/java/jdk1.8.0_172-i586
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH  

chmod 777 java.sh

source /etc/profile.d/java.sh

检查JAVA_HOME

echo $JAVA_HOME

[root@bogon jdk1.8.0_172-i586]# echo $JAVA_HOME
/usr/java/jdk1.8.0_172-i586
[root@bogon jdk1.8.0_172-i586]# 

  

上一篇:linux 卸载软件不卸载依赖


下一篇:centos7安装jdk