1. Go to the official website to download the Linux version of JDK8, I downloaded the following
2. Download Xftp and Xshell to manipulate the server, you can search for download installation, after the installation is complete, open Xshell, new link for your cloud server IP address and password, after linking, open the following options
Open after entering the/usr/local path new folder for Java, enter after the download of a good JDK dragged in
3. Enter the following command in the Xshell:
// Enter the Java directory cd/usr/local/java// unzip jdktar -zxv-f jdk-8u111-linux-x64. Tar
To save space, we can remove the JDK after the decompression is complete.
4. Configure Java Environment variables
// To open the system environment variable file using the VI editor vi /etc/profile// Open and press the I key to enter the editing state // Enter the following command at the end, note: Split with colon, not semicolon Java_home=/usr/local/java/jdk1. 8 . 0_111 CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarpath= $JAVA _home/bin: $ Pathexport java_home CLASSPATH PATH// finish, press ESC and press shift+;, enter Wq save exit // After saving successfully, enter the following command to make the configuration effective immediately Source/etc/profile
We can use the following command to check if the installation is correct
Java-version
After successful display the following information
" 1.8.0_111 " 1.8. 0_111-25.111-b14, Mixed mode)
5. Reference
Http://www.cnblogs.com/xqzt/p/4934451.html
At this point, our JDK environment is well-equipped. We'll show you how to install TOMCAT8 below. Here is the address:
CentOS 6.5 x64 Install TOMCAT8 and configure two x TOMCAT8
CentOS 6.5 x64 Installation Jdk8