Steps and FAQs for installing JDK on Centos 1. Uninstall the built-in JDK 2 before installation, download the required JDK version on the JAVA website 3, and go to the character interface, and use root permissions www.2cto.com 1 mkdir/usr/local/jdk-> to create the installation directory 2 3cp jdk-6u33-linux-x64.bin/usr/local/jdk-> copy the Installation File 4 5cd/usr/local/jdk --> convert to installation directory 6 7 chmod + x jdk-6u33-linux-x64.bin-> Add execution permission 8 www.2cto.com 9. /jdk-6u33-linux-x64.bin-> execute the Installation File 4, configure the environment variable 1vim/etc/profile --> edit the environment variable configuration file, add the following code to the end of the file: 1 # set java environment 2 export JAVA_HOME =/usr/lo Cal/jdk1.6.0 _ 333 export CLASSPATH = $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/jre/lib/rt. jar4export PATH = $ PATH: $ JAVA_HOME/bin5export JRE_HOME = $ JAVA_HOME/jre5, use the configuration file to take effect 1 source/etc/profile6, test the installation result www.2cto.com 1 shell> # java-version2java version "1.6.0 _ 33" 3 java (TM) SE Runtime Environment (build 1.6.0 _ 33-b04) 4 Java HotSpot (TM) 64-Bit Server VM (build between 8-b03, mixed mode) 5 6 shell> # javac -Version7javac 1.6.0 _ 33: the above test result indicates that JDK1.6 has been successfully installed on the local machine! If www.2cto.com 1 shell> # java-version2bash: java: command not found is not linked, create a new link 1 shell> # ln-s/usr/local/jdk/jdk1.6.0 _ 33/bin/java/usr/bin/java2shell> # ln-s/usr/ local/jdk/jdk1.6.0 _ 33/bin/javac/usr/bin/javac author Dapeng