Tomcat configuration under Ubuntu8.04 (Eclipse3.4 + Tomcat6.0.18)

Source: Internet
Author: User
Today, Tomcat is configured in Ubuntu8.04 to record future demands. 1. Download and install necessary Dongdong & lt; 1 & gt; download, install, and configure JDK. This step is not detailed. & Lt; 2 & gt; download and install Eclipse, which is not described in this step & lt; 3 & gt; download and install the Eclipse Tomcat plug-in. Here Tomcat plugin3.2.1 is used, I am not impressed with the changes in the world. Tomcat was popular at the beginning.

Tomcat is configured in Ubuntu 8.04 today to record future needs.

1. Download and install necessary things

<1> download, install, and configure JDK. This step is not detailed.

<2> download and install Eclipse.

<3> download and install the Tomcat plug-in of Eclipse. TomcatPlugin3.2.1 is used here. I am not impressed with the great changes in the world. It was not used when TomcatPlugin was popular, as a result, this version is used as a pen seal. TomcatPlugin is no longer updated, but this version still supports 6. x's

<4> download and install Tomcat

Go to the http://apache.org to download the Linux version, plus compression to copy to/opt/Tomcat

2. Configure Tomcat in a non-Eclipse Environment

<1> enter the/opt/Tomcat/bin directory and run startup. sh: it failed to run. The system prompts that the environment variables JAVA_HOME and JRE_HOME were not found. Why didn't I write the/etc/profile file when installing JDK? Why can't I find it? Let's take a look at the next step.

<2> Add environment variables to the script file.
Edit startup. sh and shutdown. sh, and add the following environment variables at the beginning of the file:

JAVA_HOME =/usr/local/jdk1.6.0 _ 4
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
JRE_HOME = $ JAVA_HOME/jre
TOMCAT_HOMR =/opt/Tomcat

<3> Save and run startup and shutdown to find that the startup and shutdown are successful. By the way, run the following command:

Sudo./startup. sh
Sudo./shutdown. sh

3. Configure Tomcat in Eclipse Environment

<1> open Eclipse and you can see the Tomcat kitten icon, indicating that the plug-in has been installed successfully.

<2> open Window> Preferences> Tomcat
Select version 6.x
Select the/opt/Tomcat directory
Select/opt/Tomcat/conf as the Context Directory

Configure the sub-options of the Tomcat tree structure:
Expand the tree structure and select "Advance"
Select the Tomcat Base directory as/opt/Tomcat
Expand the property structure and select "JVM Setting"
Add $ JAVA_HOME/lib/tools. jar to Classpath, that is, add the jar file in Classpath. This step is prepared for the next compilation and interpretation of JSP.

<3> after setting, run the Tomcat small icon and the startup time is displayed. A series of errors are shown below. Why? Originally, the following files in the context directory do not have permissions for general users in Ubuntu, so you can modify the permissions as follows:

Cd/opt/Tomcat/conf
Sudo chmod 775 *. xml

After this operation, run the following command again and you will find that it can be started and disabled properly.

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.