Recently, the use of Linux system, so the newly installed a virtual machine and CentOS 6.4来, the development of the program apes may know that in many enterprises today, the production environment is mostly Linux servers, and used more mostly centos,red Hat Series Linux system environment, below I will use my current installation of CentOS 6.4来 to illustrate the installation of the JDK 1.7.0_75 version of the operation process, as described below:
First: Download the JDK corresponding to the CentOS version: Here i download the jdk-7u75-linux-x64.tar.gz, for: http://www.oracle.com/technetwork/java/javase/ Downloads/jdk7-downloads-1880260.html
Two: Download the JDK locally and upload it to your CentOS 6.4 system server
Three: Before installing your own downloaded JDK, first look at the new installation of the CentOS 6.4 system comes with the JDK version, if there is best to uninstall, and then install their own downloaded JDK version, how to uninstall the Linux system comes with many examples of JDK online, I believe everyone will operate.
Four: Unzip just downloaded: jdk-7u75-linux-x64.tar.gz package, the command is as follows:
Tar xvf jdk-7u75-linux-x64.tar.gz
Five: After the decompression is complete, go to:
[[Email protected]~]# cd/etc
[Email protected] etc]# VI profile
At the end of the profile file, add the following command:
Export java_home=/usr/local/java/jdk1.7.0_75
Export JRE_HOME=/USR/LOCAL/JAVA/JDK1.7.0_75/JRE
Export path= $PATH:/usr/local/java/jdk1.7.0_75/bin
Export Classpath=./:/usr/local/java/jdk1.7.0_75/lib:/usr/local/java/jdk1.7.0_75/jre/lib
Input: Wq save and exit before restarting the CentOS 6.4 system
Seven: After restarting the system, enter: Java-version, if you see the following instructions your JDK has been installed successfully.
CentOS installation JDK