Install Centos JDK1.8

1. Download and install the bags


900643 20190605120310606 1445742965

2. Upload it to the Centos host using Winscp.

3. Rename the GZ file

tar zxvf jdk-8u211-linux-x64.tar.gz

4. Delete the GZ file

rm -f jdk-8u211-linux-x64.tar.gz

5. Edit /etc/profile


export JAVA_HOME=/usr/java/jdk1.8.0_211
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

6. Make an amendment and take effect

7. Check your Java version

900643 20190605121515274 1755184575

Leave a Comment