Redhat7.2 Apache and Tomcat4 Integration Example Abstracts Abstracts During Redhat Linux 7.2 Apache and Tomcat4 integration process, focus on MOD_WEBAPP.SO production methods, as well as configuration, management, and applications in a virtual host environment. (2002-10-14 12:44:29) -------------------------------------- ------------------------------------------ BY Tao Tao here introduces me In Redhat Linux 7.2, the process of integrating Apache and Tomcat4, focusing on MOD_WEBAPP.SO production methods, as well as configuration, management, and applications in a virtual host environment, have been successful. I hope to help everyone, please correct it if there is any error. First, properly install the installation of Tomcat4, as follows: 1, Java SDK version 1.3.1 or 1.4, it is recommended to install under / usr / java and make a JDK soft link. If there is a problem in the SDK of the installed version 1.3.1, please read the document: http://java.sun.com/j2se/1.3/install-linux-sdk.html 2, Tomcat4 recommends installing the latest Release version of the binary installation package . The current latest Tomcat version is 4.1.12. Download address: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.1/bin/jakarta-tomcat-4.1.12.tar.gz This example installs Tomcat in / OPT directory And made a soft link of Tomcat. Set the following environment variables and enable: path = $ PATH: / usr / java / jdk / bin: / usr / java / jdk / jre / bin java_home = / usr / java / jdk export java_home classpath = "./ USR / Java / JDK / LIB: / USR / JAVA / JDK / JRE / LIB "EXPORT CLASSPATH CATALINA_HOME = / OPT / Tomcat Export Catalina_Home recommends a single user Tomcat, set it into / opt / Tomcat, all directory files, And start Tomcat: # UserAdd Tomcat # chown -r Tomcat: Tomcat / Opt / Tomcat # su - Tomcat -c "/opt/tomcat/bin/startup.sh" Access http: // localhost: 8080 / Should be seen To the Tomcat installed successful page. Second, the integration of Apache and Tomcat4 1 The version of this case installed is 1.3 series. 2, MOD_WEBAPP.SO requires the following software package: jakarta-tomcat-connectionrs-4.x.xx-src.tar.gz download address in Tomcat corresponds to the version of the SRC directory.
For example, the Tomcat version I installed is 4.1.12, and the location of the package now required is: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.12/src/jakarta -tomcat-connection-4.1.12-src.tar.gz APR-0.9.1.tar.gz Downloads: http://www.apache.org/dist/apr/apr-0.9.1.tar.gz AutoConf -2.52-ximian.1.i386.rpm Downloads: http://rpmfind.net/linux/rpm/Helix/gnome-2-snapshot/redhat-72-i386/autoconf-2.52-ximian.1.i386.html Use RPM to install AutoConf-2.52 because the following installation will be used; then unwrapping jakarta-tomcat-connection-4.1.12-src.tar.gz, generate jakarta-tomcat-connectors-4.1.12-src directory, enter In the directory of jakarta-tomcat-connection-4.1.12-src / webapp, the APR-0.9.1.tar.gz is solved in this directory and change the directory name of the original directory APR-0.9.1. APR. Still in the webapp directory, run the following command: # Support / BuildConf.sh At this time, if the version of AutoConf is below 2.52, you must install AutoConf-2.52 first. The configure file is generated in the current directory after the command is successfully completed. Run the following command in turn: # ./configure --with-apxs = / usr / local / apache / bin / apxs # make # cp apache-1.3 / mod_webapp.so / usr / local / apache / libexec now mod_webapp.so has been made Ok, and have been copied to the Libexec directory of Apache.
Edit the Apache configuration file, in the last plus the following line: =================================== LoadModule WebApp_module libexec / mod_webapp.so addModule MOD_WEBAPP. C WebAppConnection WarpConnection Warp localhost: 8008 WebAppDeploy Examples WarpConnection / Examples ========================== Run the following command: # / usr / local / apache / Bin / Apachectl Configtest as long as "Syntax OK" shows that mod_webapp.so has been installed successfully. Start Apache # / usr / local / apache / bin / apachectl Start Access http: // localhost / example can see Tomcat's example programs.
Third, the configuration, management, and application under the virtual host use an example to explain how the virtual host uses Apache and Tomcat4 virtual host Host1's directory structure as follows: / WWW --- host1 Access log | | ---- WebApps Java application directory (new, with Tomcat's WebApps directory no association) ot otJSP root directory: used to display JSP page programs ---- Jive --- host2 ...... The configuration file is configured: ============================================== NamevirtualHost XXX.XXX.XXX .xxx
! - Define An apache-connection ->
================================================================================================================================================================================================================================================================= Plus:
Virtualhost> ............. ================================= ==== 4, set the Tomcat user into the owner of all directory files below WWW / Host1 / WebAPPS. It should be noted that if you want to upload or change the files below the directory, you must change it to Tomcat. (If you have always run Tomcat as root, this step can be omitted.) # Chown -r Tomcat: Tomcat / WWW / Host1 / WebAPPS 5, Tomcat: # su - tomcat -c "/ opt / tomcat / bin / shutdown .sh "# su - tomcat -c" /opt/tomcat/bin/startup.sh "6, restart apache: / usr / local / apache / bin / apachectl restart This time accesses http://host1.mydomain.com / Manager / HTML will prompt to enter a password. After entering the correct MyName and MyPasswd, you will see the "Tomcat Web Application Manager" page, the Application path inside is already the information configured in the virtual host, and can be performed management. The configuration and management under this virtual host will be completed, and the rest is testing and applying. In the above example we have already installed JIVE, and it is already possible to run. Tao Ran [Post Reply] [View Forum Original] [Add to Favorites] [Close] WSSWH Reply to: 2003-01-02 11: 09: 34no Find / WWW?
Ahboer Reply to: 2003-01-05 21:54:56 is wrong, I only configure Tomcat on RH8.0, but Run can't get up. Is it possible to integrate with Apache?
Hermit Reply to: 2003-01-05 22: 05: 11tomcat can run independently ... I used MOD_WEBAPP as if I have been running, I have to use MOD_JK2 on Jakarta ... ^ _ ^ ...
Oldboy Reply to: 2003-03-01 11:52:45 When the last is integrated with apache, this sentence: WebAppConnection WarpConnection Warp localhost: 8008 Is it a WebAppConnection WarpConnection Warp localhost: 8080? ? I have tried the integration, as if there is a problem, please advice: (
Oldboy Reply to: 2003-03-01 16: 34: 28Http: //192.168.1.71/examples/webapp: error 404 (file: /usr/src/jakarta-tomcat-connectors-4.1.12-src/webapp/lib / WA_REQUEST.C line: 205) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -------------------------------------- Web-Application Not Yet Deployed is MOD_WEBAPP.SO problem? ? You Reply to: 2003-04-23 16:18:52 Run support / buildconf.sh --- Creating WebApp "configure" script create configure ... / usr / bin / autoc: / nfs / users / Thunder / CVS / Ximian-Desktop / AutoConf / DEST / USR / BIN / AUTOM4TE: No Such File or Directory / USR / BIN / AutoConf: Exec: / NFS / USERS / Thunder / CVS / Ximian-Desktop / AutoCONF / DEST / USR / BIN / Autom4TE : Cannot Execute: No Such File or Directory? ? ? ? ? ? ? ? ? ? ? ?
Apile Reply to: 2003-09-17 19:17:42 Solve the above question: 1. Fix the servername inside httpd.conf to localhost: 8008 or XXX: 8008, remember to add: 8008 is right .. 2. Tomcat's server.xml is looking for service> -> Take it ... Tomcat-4.1.27 Older Version makes it up with this paragraph .... Because 4.1.27 does not have this service ... Use the top written on it .. Tomcat can't start 3. Restart Tomcat and Apache ... You can continue Set the Virtual Host section ........
Jackylau Reply to: 2003-11-19 15:51:26 How to make boot automatically start Tomcat (under Linux)?
Kenmin Reply to: 2004-01-30 00:07:48 It seems that mod_jk is used to replace mod_webapp, can you not introduce with mod_jk integration apache and tomcat, there is also a certain version of Apache and Tomcat when there is a certain version. Requirements? My Apache, JDK, Tomcat has been equipped, but 3 files have been generated when compiling MOD_JK, one is mod_jk.so.u, and two are linked to this file, it should be failed, but not Know why. There are apache if the directory where the file is installed, the file is located, and the integration process of the two installation methods can be introduced, thank you. .