Tomcat 1.1 drops (1) basic setup

Source: Internet
Author: User
Tags microsoft iis

Tomcat 1.1 drops) basic setup

Currently, the mainstream web servers and their respective services are as follows:
Microsoft IIS . Net
Apache Html/PHP
Nginx Html/PHP
Tomcat Jsp
Preface:Tomcat is a lightweight application server. It is widely used in small and medium-sized systems and not many concurrent users. It is the first choice for JSP program development and debugging. For a beginner, it can be thought that when an Apache server is configured on a machine, it can be used to respond to access requests to HTML pages. In fact, Tomcat is an extension of the Apache server, but it runs independently. Therefore, when you run tomcat, it actually runs independently as a process independent of Apache. When the configuration is correct, Apache serves the HTML page, while Tomcat actually runs the JSP page and Servlet. In addition, Tomcat, like Web servers such as IIS and Apache, can process HTML pages. In addition, it is a Servlet and JSP Container. The independent Servlet container is the default mode of Tomcat. However, Tomcat cannot process static HTML as well as Apache servers. The latest version of Tomcat is 8.0.28. I have never been familiar with Tomcat, so I have learned it with everyone. 1. Tomcat provides services for Jsp pages, so the java environment is required. First install jdkDownload jdk-6u24-linux-i586-rpm.bin to local/usr/java
 
 
  1. Cd/usr/java
  2. Chmod 755 jdk-6u24-linux-i586-rpm.bin # Add execution Permissions
  3. ./Jdk-6u24-linux-i586-rpm.bin # The file that generates the jdk-6u1-linux-i586.rpm
  4.  
  5. When the page displays "Press Enter to continue..." # Press Enter.
After the installation is complete, jdk1.6.0 _ 24 is generated in the current directory. Next, modify the environment variable to make it referenced by the system. Add the following content to/etc/profile:
 
 
  1. JAVA_HOME=/usr/java/jdk1.6.0_24  
  2. CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar  
  3. PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin  
  4. export PATH CLASSPATH JAVA_HOME 
Source/etc/profile # test the configuration file that takes effect immediately: execute java-version. If it is correct, it will show: java version "1.6.0 _ 24" Java (TM) SE Runtime Environment (build 1.6.0 _ 24-b07) Java HotSpot (TM) Client VM (build 19.1-b02, mixed mode, sharing) 2. install tomcat here select "Install-free green") --- that is, unzip the package to useDownload apache-tomcat-6.0.35.tar.gz to/usr/local
 
 
  1. Tar zxf apache-tomcat-6.0.35.tar.gz # Extract files
  2. Mv apache-tomcat-6.0.35 tomcat # renamed, easy to write path
  3.  
  4. /Usr/local/tomcat/bin/startup. sh # Start the script
  5. /Usr/local/tomcat/bin/shutdown. sh # Close the script
By default, port 8080 is monitored. How can I modify the default website directory tomcat/webapps? Find the following section in vim/usr/local/tomcat/conf/server. xml:
 
 
  1. <Connector port = "8001" protocol = "HTTP/1.1" # change the port to the desired port.
  2. ConnectionTimeout = "20000"
  3. RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
Change the default directory: Add a row:
 
 
  1. <Context path = "" docBase = "/web" debug = "0" reloadable = "false" xmlNamespaceAware = "false" xmlValidation = "false"/--> # docBase directory path
Enter the address: http: // ip: 8080 to access. The default homepage is displayed:

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/034030OV-0.jpg "/>

By now, the basic setup of Tomcat is complete. Follow-up:Tomcat 1.1 drops 2) configure the application Tomcat full series notes:

 

Tomcat 1.1 drops) Build Tomcat 1.1 drops (2) configure the application Tomcat 1.1 drops (3) Integrate Apache and NginxTomcat 1.1 drops (4) Cluster deployment and session sharing Tomcat 1.1 drops (5) performance Tuning

 

This article is from the "____ documents. Time ^ notes" blog, please be sure to keep this http://xtony.blog.51cto.com/3964396/988706

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.