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 to the local and upload it to your CentOS 6.4 system under the OPT temp directory.
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: Create a new JDK installation directory, I am here to create a new Java directory under/usr/local/, command: Mkdir/usr/local/java, and then copy the jdk-7u75-linux-x64.tar.gz compressed package from the OPT directory to/usr Under the/local/java directory, the command is as follows:
CP Jdk-7u75-linux-x64.tar.gz/usr/local/java
Five: Unzip just downloaded: jdk-7u75-linux-x64.tar.gz package, the command is as follows:
Tar xvf jdk-7u75-linux-x64.tar.gz
Six: 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.
650) this.width=650; "Src=" http://img.blog.csdn.net/20150211111901534?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvc3hkdhpoyw94aw5ndw8=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/ Gravity/center "style=" Border:none;height:auto; "/>
This article is from the "small White love life" blog, please be sure to keep this source http://sf1314.blog.51cto.com/13295031/1973878
Install jdk-7u75-linux-x64.gz,jdk1.7.0_75,jdk1.7 steps under Linux: