Java installs 6 small parts (for beginners)1. Download the package
# wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz? authparam=1441937568_6752e90a2aa70be3cf8baa0b8905125c
Change the software name, I do not know why wget downloaded the name is quite chaotic
# MV Jdk-7u79-linux-x64.tar.gz? Authparam=1441937568_6752e90a2aa70be3cf8baa0b8905125c/root/jdk-7u79-linux-x64.tar.gz
# CD
2. Unzip the JDK file
# tar zxf jdk-7u79-linux-x64.gz-c/data/
3. Create a soft connection
# ln-s/data/jdk1.7.0_79/usr/local/java
4. Edit Environment variables (enter: $ to navigate to the last line of the file, and then edit the last side of the file)
# Vim/etc/profile
1 #------------------------------JAVA------------------------------# 2 export java_home=/usr/local/ Java 3 export path= $JAVA _home/bin: $PATH 4 export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jar
5. Make the Java environment variable effective
# Source/etc/profile
6. Verify that Java is installed successfully (this command will return Java version information)
# java-version
1 Java Version "1.7.0_79" 2 Java (tm) SE Runtime Environment (build 1.7.0_79-B15) 3 java HotSpot (tm) 64-bit Server VM (build 24.79-b02, mixed mode)
Linux Installation Deployment Java