Install and start Tomcat in Linux

Source: Internet
Author: User
This document uses tomcat-5.5.33 as an example. 1) decompress the package into a folder, depending on the file format. 2) $ vi/etc/profile # open the file in the vi editor for editing (add environment variables) and add the following code at the end of the file: CATALINA_HOME/tools/apache -...

 

This document uses tomcat-5.5.33 as an example.

 

 

 

1) decompress the package into a folder, depending on the file format.

 

 

 

2) $ vi/etc/profile # open the file in the vi editor and edit it (add environment variables)

Add the following code at the end of the file:

CATALINA_HOME =/tools/apache-tomcat-5.5.33 # (the tomcat version depends on your installation version)

Export CATALINA _ HOME

Save and exit.

 

 

 

 

3) run the following command on the terminal:

$/Tools/tomcat */bin/startup. sh # enable TOMCAT server

Open the browser and enter http: // localhost: 8080 or http: // 127.0.0.1: 8080. if you see the cute kitten, the installation is successful!

 

 

 

Note: Several problems encountered during installation

 

Question 1: can't find the file 'setclasspath. SH'

 

Find the following explanation on the network, that is, you need to set

 

Then all you need to do is to include the complete paths for the BASEDIR and CATALINA_HOME variables in the files setclasspath. sh and catalina. sh respectively.

 

This shoshould be done even if CATALINA_HOME has been defined and exported previusly on the command line and/or in/etc/profile as well. moreover, this error message persists even though the file setclasspath. sh is present in Tomcat's bin directory.

 

$ Echo "BASEDIR =/path/to/tomcat"> setclasspath. sh #/path/to indicates your specific directory $ echo "CATALINA_HOME =/path/to/tomcat"> catalina. sh. However, after setting the preceding settings, run the export command to view the environment variables. it is found that CATALINA_HOME has not changed, therefore, use the following command to modify $ export CATALINA_HOME = "/home/owner/tomcat-5.5.33"

Problem 2: JAVA_HOME or JRE cannot be found. because it is not set, Tomcat cannot find the corresponding environment variable, but the solution to startup is very simple. in the terminal: $ export JAVA_HOME = "/home/owner/tools/jdk1.6.0 _ 26"

 

This article is from the "Michael_Feng" blog

Related Article

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.