JDK installation tar.gz is the version that can be used after decompression, here we will jdk-7u3-linux-i586.tar.gz decompression to/usr/local/. 1. Unzip to the current directory: $ TAR-ZXVF/OPT/SETUP/JDK-7-EA-BIN-B145-LINUX-I586-07_JUN_2011.TAR.GZ2, environment configuration ① $sudo Vi/etc/profile② Add #set Java environmentjava_home=/usr/local/jdk1.7.0classpath= to the end line: $JAVA _home/lib.tools.jarpath= $JAVA _home/bin: $PATHexport java_home CLASSPATH Path Save exit ③$ Source/etc/profile make the changed configuration effective immediately ④$ java-version View JDK version information, If the 1.7.0 proves successful ⑤ make the JDK use $ vi/etc/profile.d/java.sh in all users to create a new java.sh execution file, fill in the JDK-related environment configuration information, such as: $ chmod 755/etc/ profile.d/java.sh assigning permissions to java.sh
Linux under JDK tar.gz package installation method