Configuring JDK and Tomcat under Linux

Source: Internet
Author: User

The first step: first install the Linux system on the VM, here does not introduce how to install Linux system, will not go to Baidu. But here's a reminder of how the virtual machine and the native are going to transfer data, and I'm using the [Virtual machine sharing file option].

Installation method: Virtual machine menu Vm-instal VMware Tools and installed. If you are installing JDK and Tomcat under a real Linux system, you can ignore this step.

Set up shared folders

Step two: Download JDK and Tomcat

    1. Download jdk-8u111-linux-x64.rpm

Jdk:http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. Download apache-tomcat-8.5.9.tar.gz

: http://tomcat.apache.org/download-80.cgi

After success, put jdk-8u111-linux-x64.rpm and apache-tomcat-8.5.9.tar.gz under the F:\VM shared folder.

Step three: Install JDK and Tomcat

    1. To run the Linux system, be aware that you need to enter it with the root user.
    2. The file under directory/mnt/hgfs file is the same as the host "F:\vm shared Files" file, if there is a difference, it is your computer running too slow, has not reacted. You can complete the installation by double-clicking the/mnt/hgfs/aaa/jdk-8u111-linux-x64.rpm file.
    3. At the command line, enter:

Vi/etc/profile

Add the following, as shown in

Export java_home=/usr/java/jdk1.8.0_111

Export Java_bin=/usr/java/jdk1.8.0_111/bin

Export path= $PATH: $JAVA _home/bin

Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

Export Java_home java_bin PATH CLASSPATH

4. Enter the/usr/bin/directory

Cd/usr/bin

Ln-s-f/usr/java/jdk1.8.0_111/jre/bin/java

Ln-s-f/usr/java/jdk1.8.0_111/bin/javac

Java–version

Screen output:

Java Version "jdk1.8.0_111"

Java (TM) SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot (TM) 64-bit Server VM (build 25.111-b14, Mixed mode)

To indicate that the installation was successful or the installation failed.

    1. Command Line Input:

#tar-ZXVF apache-tomcat-8.5.9.tar.gz//Decompression

#cp-R apache-tomcat-8.5.9/usr/local/tomcat//copy apache-tomcat-5.5.29 to/usr/local/and renamed Tomcat

/usr/local/tomcat/bin/startup.sh//Start Tomcat

Screen output:

Using catalina_base:/usr/local/tomcat

Using Catalina_home:/usr/local/tomcat

Using Catalina_temdir:/usr/local/tomcat/temp

Using Java_home:/usr/java/jdk1.6.0_20

To this tomcat has been installed, now using the browser to access http://localhost:8080, the Tomcat default page appears, indicating that the installation was successful. As shown in the following:

Configuring JDK and Tomcat under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.