First, download the JDK
Reference: http://www.codingyun.com/article/40.html
You can download it locally and then FTP to the server
can also be downloaded directly from the server (Windows version of the 32-bit and 64-bit, Ubuntu (Linux) version of the non-differentiated)
Http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.tar.gz? Authparam=1447866593_14c651521d060c106fe19b59b69722e4
There is a problem (wget get only page 5037 what), can refer to: http://www.cnblogs.com/1995hxt/p/4976436.html, behind the Authparam himself F12 get
Second, decompression and installation
Unzip first
| 1 |
tar zxvf jdk-8u65-linux-x64.tar.gz -C /usr/java/ |
then renamed to Java7.
Third, configure environment variables
Add the following four sentences at the back
| 1234 |
export JAVA_HOME=/usr/java/java8export JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:$PATH |
Exit VI refresh variable after saving to make the configuration take effect immediately
Enter the bin directory of Tomcat
Iv. Testing
[Email protected]:~$ java-version
Linux Installation Configuration JDK