1. Assign Read and Write permissions (assuming my jdk-6u24-linux-i586.bin is in my/app root directory):
chmod 755 jdk-6u24-linux-i586.bin
2, run Jdk-6u24-linux-i586.bin will automatically decompression
./jdk-6u24-linux-i586.bin
3. Life name (optional)
MV Jdk-6u24-linux JDK
4. Modify Environment variables
Vi/etc/profile
At the end add the following (note: Here is the app root directory):
Export JAVA_HOME=/APP/JDK
export classpath=.: $JAVA _home/lib: $JAVA _home/jre/lib
export path=.: $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $CLASSPATH
5. Refresh environment variable takes effect
Source/etc/profile
6. Check if the JDK is installed successfully
java-version appears as follows (configuration succeeded):
java Version "1.6.0_24"
Java (TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot (TM) Client VM (build 19.1-b02, Mixed mode)
Welcome everyone to visit my personal website Meng Meng's IT People
Install JDK under red head Linux