[ master@bogon ~]$ java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment(build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM(build 25.65-b01, mixed mode)
[ master@bogon ~]$ rpm -qa | grep java
python-javapackages-3.4.1-11.el7.noarch
java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64
java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64
tzdata-java-2015g-1.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
[ master@bogon ~]$ rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
Error: can't create transaction lock on/var/lib/rpm/.rpm.lock(Insufficient permissions)[master@bogon ~]$ su
password:
[ root@bogon master]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
[ root@bogon master]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
[ root@bogon master]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64
[ root@bogon master]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64
[ root@bogon master]# rpm -e --nodeps tzdata-java-2015g-1.el7.noarch
[ root@bogon opt]# vim /etc/profile.d/java.sh
JAVA_HOME=/opt/jdk1.8.0_72
JRE_HOME=/opt/jdk1.8.0_72/jre
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH
PATH=$JAVA_HOME/bin:$PATH
[ root@bogon opt]# source /etc/profile.d/java.sh
[ root@bogon opt]# java -version
java version "1.8.0_77"Java(TM) SE Runtime Environment(build 1.8.0_77-b03)
Java HotSpot(TM)64-Bit Server VM(build 25.77-b03, mixed mode)[root@bogon opt]#
Recommended Posts