First, uninstall the original OPENJDK
After that will show up all unloaded and I here is 5
- RPM-E--nodeps java-1.7.0-openjdk-1.7.0.111-2.6.7.2.el7_2.x86_64
- RPM-E--nodeps java-1.7.0-openjdk-headless-1.7.0.111-2.6.7.2.el7_2.x86_64
- RPM-E--nodeps Python-javapackages-3.4.1-11.el7.noarch
- RPM-E--nodeps Javapackages-tools-3.4.1-11.el7.noarch
- RPM-E--nodeps Tzdata-java-2016h-1.el7.noarch
Finally, by Rpm-qa | grep java to see if there is any content, if not, the instructions are uninstalled cleanly.
Second, install Sun JDK
1. Download the JDK locally from the Oracle website.
2. Upload the locally downloaded JDK to the virtual machine
- SCP jdk-8u102-linux-x64.tar.gz [Email protected]:/opt/
3. Decompression
- TAR-XVF jdk-8u102-linux-x64.tar.gz
4. Configure Environment variables
1 java_home=/opt/jdk1.8.0_102 2 Export Java_home 3 Export path= $PATH: $JAVA _home/bin
5. Verification
The first chapter deletes the original CentOS openjdk and installs the Sun JDK