Summary of Tomcat installation on linux

Source: Internet
Author: User
Summary of installing Tomcat on linux platform-Linux Enterprise Application-Linux server application information. The following is a detailed description. I have been playing with Tomcat over the past few days. I want to configure it on my FC2 and have encountered some problems. Here I will summarize it and share it with my brothers.

(This is the first time I posted such summative post on the Forum. If not, please correct me.

Before installing Tomcat, make sure that jdk has been installed on your system. The installation process is not described here.

Tomcat configuration process (linux ):
1. To the http://jakarta.apache.org/site/binindex.cgi (download A tomcat )), zip tar.bz2> compressed package, decompress it to/usr/local/directory.

2. Configure environment variables: to configure the environment variables required for Tomcat after the system starts later, you need to set them in the/etc/profile file.
CATALINA_BASE = "/usr/local/jakarta-tomcat-5.0.28"
CATALINA_HOME = "/usr/local/jakarta-tomcat-5.0.28"
PATH = $ PATH: $ CATALINA_HOME/bin
Export CATALINA_BASE CATALINA_HOME PATH
After the environment variables are configured, try typing http: // localhost: 8080 in the browser.
Will the Tomcat homepage appear? If so, it indicates that your Tomcat server is started, Congratulations!
If it does not appear, check whether your environment variables are correctly set. If it is completely correct but still does not work, consider using Tomcat> Version (Higher ?), This is because my server solves the problem.

3. Create a new admin user for Tomcat. To do this, edit jakarta/conf/tomcat-users.xml and add a line similar to the following:

In this way, you can click the "Tomcat Administration" link on the left of the Tomcat home page to go to a logon page. Enter the user you just created to further configure the server.

4. create your own application. for example, if you want to create an application named "myapps", create a folder named myapps under jakarta/webapps/and go to the "Tomcat Web Server Administration Tool" page, find Tomcat Server --> Services --> Host in the tree on the left, click it, and find "Host Actions" on the page displayed on the right ", select "Create New Content"> from the drop-down list. On the displayed page, you need to set the parameters of an application. The two most important parameters are "Document Base" and "Path ":
"Document Base" refers to the path of your application folder, for example:
/Usr/local/jakarta/webapps/myapps/
"Path" indicates the Path of the browser request address, for example,/myapps.
Another parameter "Use Naming" is set to "True". I am not sure about its purpose?
After these two parameters are set, Tomcat establishes a ing relationship between the two parameters. When you enter the address in the browser:
Http: /localhost: 8080/myapps/index.html
The server will call the/usr/local/jakarta/webapps/myapps/index.html file.
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.