|
Explanation: The installation process of recording JDK7 in CentOS 6.6.
1. official website to download jdk7
Download: http: //www.Oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I downloaded version is jdk-7u76-linux-x64.rpm, available wget command to download:
# Wget -c http://download.oracle.com/otn-pub/java/jdk/7u76-b13/jdk-7u76-linux-x64.rpm?AuthParam=1423901832_534664d912e74413fbff4253bb05da97
After the download, you need to rename the file:
# Mv jdk-7u76-linux-x64.rpm \? AuthParam \ = 1423901832_534664d912e74413fbff4253bb05da97 jdk-7u76-linux-x64.rpm
2. rpm command to install
# Rpm -ivh jdk-7u76-linux-x64.rpm
3. Set the environment variables
# Cd / usr / java
# Ls
/ Usr / java / directory reads as follows:
# Ls
default jdk1.7.0_76 latest
Information obtained from the above jdk1.7.0_76, in the following configuration environment variable to use
# Vim / etc / profile
In the / etc / profile file additional content:
export JAVA_HOME = / usr / java / jdk1.7.0_76
export CLASSPATH =:. $ JAVA_HOME / jre / lib / rt.jar: $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar
export PATH = $ PATH: $ JAVA_HOME / bin
After an additional,: wq to save and exit, let's environment variables to take effect:
# Source / etc / profile
4. View java version
# Java -version
as follows:
java version "1.7.0_76"
Java (TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot (TM) 64-Bit Server VM (build 24.76-b04, mixed mode)
5. detect normal available
# Java
# Javac
If the command usage is displayed, indicating a successful installation.
OK, Enjoy it !!! |
|
|
|