Linux version
http://download.csdn.net/download/love254443233/9179483
Installation of 1.JDK 1. Download JDK
First look at how many bits (32-bit/64-bit) The Linux system is: getconf long_bit. Download JDK 7,linux from the JDK website (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) 64-bit download jdk-7u60-linux-x64.tar.gz.
2. Unzip the installation
2.1 Choose where to install the JDK/usr/java, if there is no need to create this directory, the general new to the machine is not this directory, this we create this directory.
[Java]View PlainCopyprint?
- sudo mkdir/usr/java
2.2 Upload jdk-7u60-linux-x64.tar.gz to the server and move to/usr/java.
[Java]View PlainCopyprint?
- sudo mv Jdk-7u60-linux-x64.gz/usr/java
2.3 Decompression: Go to/usr/java directory (CD Usr/java) unzip
[Java]View PlainCopy print?
- sudo tar-zxvfjdk-7u60-linux-x64.gz
2.4 Delete jdk-7u60-linux-x64.tar.gz
3. Configure Environment variables
Open/etc/profile (sudo vim/etc/profile) and add the following on the last side:
[Java]View PlainCopyprint?
- Export JAVA_HOME=/USR/JAVA/JDK1. 7.0_60
- Export JRE_HOME=/USR/JAVA/JDK1. 7.0_60/jre
- Exportclasspath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib
- Export path= $PATH: $JAVA _home/bin
Let the configuration take effect:
[Java]View PlainCopyprint?
- Source/etc/profile
4. Verification
[Java]View PlainCopyprint?
- Java–version
To print the currently installed JDK version number "1.7.0_60"
Install JDK1.7 under Linux