Here simply write the whole process of Centos7mini installation jdk1.8.
First, download the Jdk,linux version.
Address: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Second, check whether Linux has been installed, and uninstall.
--qa | grep java
-e–nodeps tzdata-java-2012c-1-e–nodeps java-1.6. 0-openjdk-1.6. 0.0-1.45. 1.11. 1. el6.x86_64
Iii. unpacking and installing the JDK
1. Xshell The JDK's tar.gz compression package to the Linux/usr directory using the. 2. Go to the/usr directory and unzip the package. /usr -zxvf jdk-8u111-linux-x64.tar.gz3. Change the extracted folder name and delete the compressed package MV Jdk1. 8. 0_111/jdk1. 8
IV. Configuring environment variables and testing
After installation, you need to configure the environment variables,edit/etc//etc/profileat the end of the file to add the following configuration: Export java_home=/usr/jdk1.8Export CLASSPATH=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar export PATH=$ PATH: $JAVA _home/bin
After editing, remember to enter: Wq save exit, the last step is to reload the/etc/profile file via the source command, so that the modified content is valid in the current shell window:
Source/etc/profile
Test: Java-version, can see version description configured successfully
CENTOS7 Mini Configuration Linux Server (quad) configure JDK