One of the integration of Tomcat and Apache servers under Linux

Source: Internet
Author: User
Tags add chmod interface client access tomcat tomcat server linux
apache| Server Introduction

Internet/intranet based on web technology has been widely used in recent years, Intranet is based on TCP/IP protocol, the web as the core intranet, the user through Low-cost, An Easy-to-use client browser can access the data you need on the corporate web site anytime, anywhere.

The consistency of the browser client interface avoids the diversity of C/S mode client programs, while the Open and standards-based connection schemes on the server side make it easy for enterprises to connect with the outside world through the Internet, and the dynamic and interactive publishing methods of Web information fundamentally change the service quality of the enterprise. Increased business opportunities for businesses.

In the view of many users, the success or failure of a Web site depends primarily on the content and functionality it provides, and the Web servers that support the content and functionality play a very important role.

Tomcat container

Tomcat is a free open source Serlvet container, a core project in the Apache Foundation's Jakarta Project, developed by Apache,sun and other companies and individuals. Thanks to Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat.

Tomcat is a solid stand-alone Web server and Servlet Container, but its Web server is not as complete as many of the more robust Web servers, such as the Apache Web server (for example, Tomcat does not have a large number of optional modules). However, Tomcat is free Open-source software, and many experts are committed to its development.

Install Tomcat under Linux

You need to install J2SDK (Java 2 Software Development Kit) before installing Tomcat, and the steps to install J2SDK are as follows:

1) to http://www.java.sun.com download j2sdk, such as J2sdk-1_4_2_04-linux-i586-rpm.bin.

2 in the terminal to the directory where the J2sdk-1_4_2_04-linux-i586-rpm.bin, enter the command chmod +x j2sdk-1_4_2_04-linux-i586-rpm.bin, add the permissions to execute.

3 Execute the command./j2sdk-1_4_2_04-linux-i586-rpm.bin, generate j2sdk-1_4_2_04-linux-i586.rpm files.

4 Execute the command chmod +x j2sdk-1_4_2_04-linux-i586.rpm and add the execution permissions to j2sdk-1_4_2_04-linux-i586.rpm.

5 Execute command RPM IVH j2sdk-1_4_2_04-linux-i586.rpm, install J2SDK.

6 The installation interface will appear authorization agreement, press ENTER to accept, the J2SD installed in/usr/java/j2sdk1.4.2_04.

7 Set the environment variable, in the/etc/profile.d/directory to establish a file java.sh, the contents of the document are as follows:

#set Java Environment

Export Java_home=/usr/java/j2sdk1.4.2_04

Export classpath=.: $JAVA _home/lib: $JAVA _home/jre/lib:/usr/java/jdbc

Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH

8 Execute command chmod 755/etc/profile.d/java.sh, assign permissions to java.sh.

9 in the terminal to execute the command Javac? Help and Java version, if you see the information, then J2SDK has been successfully installed.

Next, install Tomcat, and the following steps are to install Tomcat:

1 visit http://jakarta.apache.org/tomcat/index.html, download the binary sedan tomcat, such as jakarta-tomcat-5.5.10.tar.gz, extract to the/usr/local directory:

Cd/usr/local

Gzip ZXVF jakarta-tomcat-5.5.10.tar.gz

2) Modify $tomcat/bin/startup.sh and shutdown.sh files,

Export Java_home=/usr/java/j2sdk1.4.2_04

Export catalina_home=/usr/local/tomcat-5.5.10

Export classpath=.: $JAVA _home/lib: $JAVA _home/jre/lib:/usr/java/jdbc

Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH

3 Execute startup.sh to access the default face page of Tomcat in http://localhost:8080/.

The advantages of running Tomcat alone

1) Easy erection. Download Tomcat, set some configuration, and it's done. It does not take time to consolidate the Web server's connectors into other Web servers.

2 Do not need to worry about connectors. You never need to exclude any performance or online problems between other Web servers and tomcat.

3 has better safety protection. Compared to other Web servers written in C and C + +, Tomcat can tolerate remote buffer overflow attacks. Because Tomcat's Java Virtual machine is located between the network and the operating system, it protects against almost any type of buffer overflow attack. You can specify access to individual resources by using Tomcat's security protection domain.

4) easy to transplant. You can migrate Tomcat servers (and applications) to different servers, operating systems, and even architectures. Because Tomcat is written in Java, it is possible to replicate the contents of its entire directory structure to other computers without any change whatsoever, even if the new computer's architecture is different from the original.

The disadvantage of running Tomcat alone

1 Tomcat has less support software. Tomcat's built-in Web server has fewer support software than Apache httpd Web servers.

2 Tomcat's Web server features less. The Apache httpd server has more complete functionality than the Tomcat Web server.

3 Although Tomcat runs fast, it's not as fast as Apache httpd. The tomcat server is slower than the Apache httpd, but it's still improving, and it's still very fast, fast enough to run most of today's corporate web sites, but not Apache fast in providing static page content.

Apache Web Server

Apache is based on NCSA's servers, NCSA is one of the first Web server programs to emerge, developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-champaign. In the early stages of development, Apache was primarily a UNIX-based server, and its mission was to build a UNIX-enabled, more powerful, more efficient, and faster WWW server, which made it evolve from other servers, And added a large number of patches to enhance its performance on one side, so it is named "Apa+chy Server (a patch composed of servers)." To this day, Apache has been ported to many platforms. The development of Apache follows the GPL protocol and is developed and maintained by volunteers worldwide. It is still free and exposes the source code while maintaining strong functionality and constant updates.

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.