1. Official jdk:http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm
2, Linux under execution:wget-c-p/root/downloads--no-check-certificate --no-cookie--header "cookie:s_nr= 1420682671945; S_cc=true; Oraclelicense=accept-securebackup-cookie; Gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk7-downloads-1880260.html;s_ sq=%5b%5bb%5d%5d " http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm
3, the establishment of the directory: #mkdir/usr/java
4. Copy the downloaded jdk-8u92-linux-x64.rpm to the/usr/java directory
#cp /root/downloads/jdk-8u92-linux-x64.rpm/usr/java
5. Add executable permissions, and install
# cd/usr/java/
# chmod +x jdk-8u92-linux-x64.rpm
#rpm-IVH jdk-8u92-linux-x64.rpm
6. Configure Environment variables
Enter edit Profile
#vim /etc/profile
At the end of the profile file, add the following:
export java_home=/usr/ java/jdk1.8.0_91
Export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar BR style= "LINE-HEIGHT:25.2PX;" > Export path= $PATH: $JAVA _home/bin
save and exit.
7, and finally executes the following
#source/etc/profile
Download and install JDK and configuration under Linux_centos