Download the appropriate version from the official website (click to go to Oracle), I downloaded the jdk-6u45-linux-x64.bin, my server environment is the centos5.10 version
Copy to the directory where you want to install the JDK (my/usr/local/soft directory)
Modified to executable: chmod 755 jdk-6u45-linux-x64.bin
Perform installation:./Jdk-6u45-linux-x64.bin (Installation complete, you can see the./jdk1.6.0_45 directory,jdk-6u45-linux-x64.bin files can be deleted )
Vi/etc/profile usually appends the last line with the # Hebad start ... # jdk Configexport java_home=/usr/local/soft/jdk1.6.0_45export classpath=.: $JAVA _home/jre/lib: $JAVA _home/lib: $JAVA _home/lib/tools.jarpath= $PATH: $JAVA _home/bin
6. Save Exit VI Editor, execute source/etc/profile command, perform java-version verification is successful
Installation and configuration of CentOS jdk1.6