Integration with Apache2 Tomcat6

2011-05-14  来源:本站原创  分类:Tech  人气:131 

Operating Environment: Windows7
First, the installation program
1. Install jdk-6u11 (jdk-6u11-windows-i586-p.exe file)
Be installed in D: \ Program Files \ Java \ jdk1.6.0_11 under
2. Installing Apache server (httpd-2.2.17-win32-x86-no_ssl.msi)
Automatic installation package to run Apache, install Apache2.2.17 to
D: \ Program Files \ Apache Software Foundation \ Apache2.2 directory.
3. Install Tomcat server (japache-tomcat-6.0.24.exe)
Automatic installation package to run Tomcat, the installation
Tomcat 6.0 to D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 directory.
4. Install mod_jk (mod_jk-1.2.30-httpd-2.2.3.so)
Copy mod_jk-1.2.30-httpd-2.2.3.so file to
D: \ Program Files \ Apache Software Foundation \ Apache2.2 \ modules folder.
Download: http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.30/
5. Preparation and test files in the directory E: drive new directory www, and create a basic index.jsp file, source as follows:

1. Configuring Apache server, edit the httpd.conf file, in the end of the file add the following:

# Using mod_jk2.dll to redirect dynamic calls to Tomcat
LoadModule jk_module "D:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk-1.2.30
-httpd-2.2.3.so"
JkWorkersFile "D:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/workers.properties"
JkLogFile "D:/Program Files/Apache Software Foundation/Tomcat 6.0/logs/mod_jk2.log"
JkLogLevel info
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
Alias /web "E:/www/"
<Directory "E:/www">
Options Indexes MultiViews
AddOutputFilter Includes html
AllowOverride None
Order allow,deny
Allow from all
</Directory>

2. Configuring Tomcat server
1, the establishment of workers.properties file in D: / Program Files / Apache Software Foundation / Tomcat 6.0/conf / directory and name the new text document
workers.properties, write the following:

workers.tomcat_home=D:\Program Files\Apache Software Foundation\Tomcat 6.0
workers.java_home=D:\Program Files\Java\jdk1.6.0_11
ps=\
worker.list=ajp13 

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)common$(ps)lib$(ps)jasper.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)common$(ps)lib$(ps)servlet.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)common$(ps)lib$(ps)webserver.jar
worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar
worker.inprocess.cmd_line=-config
worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml
worker.inprocess.cmd_line=-home
worker.inprocess.cmd_line=$(workers.tomcat_home)
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)inprocess.stderr
worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)

2, modify the server.xml file in D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 \ conf directory to find server.xml file, text document

Opens search </ HOST>.
In </ HOST> add the first line of the following:

<Context path="/web" docBase="E:/www" debug="0" reloadable="true" > </Context>

3, modified jk2.properties file in D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 \ conf directory to find (or create) jk2.properties text

Parts, with the document open and delete all contents.
Jk2.properties file contents will be filled in as the following:

## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED
## WHEN YOU EDIT THE FILE.
## COMMENTS WILL BE _LOST_
## DOCUMENTATION OF THE FORMAT IN JkMain javadoc.
# Set the desired handler list
handler.list=apr,request,channelJni
#
# Override the default port for the socketChannel
# channelSocket.port=8019
# Default:
# channelUnix.file=${jkHome}/work/jk2.socket
# Just to check if the the config is working
# shm.file=${jkHome}/work/jk2.shm
# In order to enable jni use any channelJni directive
# channelJni.disabled = 0
# And one of the following directives:
# apr.jniModeSo=/opt/apache2/modules/mod_jk2.so
# If set to inprocess the mod_jk2 will Register natives itself
# This will enable the starting of the Tomcat from mod_jk2
# apr.jniModeSo=inprocess
#request.tomcatAuthentication=true
request.tomcatAuthentication=false

Third, the system environment variable configuration
Right My Computer - Properties - Advanced - Environment Variables, add the following variables in the system variables

JAVA_HOME = D: \ Program Files \ Java \ jdk1.6.0_11
TOMCAT_HOME = D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0
CATALINA_HOME = D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0
PATH =% PATH%;% JAVA_HOME% \ BIN
CLASSPATH =;% JAVA_HOME% \ lib \ dt.jar;% JAVA_HOME% \ lib \ tool.jar;% JAVA_HOME% \ lib \ NetComponents.jar;
% JAVA_HOME% \ lib \ mm.mysql-2.0.4-bin.jar
CLASSPATH =% CLASSPATH%;% TOMCAT_HOME% \ common \ classes;% TOMCAT_HOME% \ common \ lib;% TOMCAT_HOME% \ common \ lib \ servlet-api.jar

The above configuration is complete, restart the system

Fourth, run the test program
Start - Run D: \ Program Files \ Apache Software Foundation \ Tomcat 6.0 \ bin \ startup.bat (start Tomcat), then run D: \ Program Files \ Apache Software Foundation \ Apache2.2 \ bin \ ApacheMonitor.exe (start the Apache .)
Open the IE browser, respectively, enter the following address:
http://127.0.0.1/web/index.jsp
http://127.0.0.1:8080/web/index.jsp
If the same page, are there:
Hello: [email protected] ..
That successful preparation, the effect see Annex!

相关文章
  • Integration with Apache2 Tomcat6 2011-05-14

    Operating Environment: Windows7 First, the installation program 1. Install jdk-6u11 (jdk-6u11-windows-i586-p.exe file) Be installed in D: \ Program Files \ Java \ jdk1.6.0_11 under 2. Installing Apache server (httpd-2.2.17-win32-x86-no_ssl.msi) Autom

  • apache2+tomcat6负载均衡配置方法 2012-05-18

    Apache2+tomcat6负载均衡配置方法(转载) 一.apache2安装 1.mod_jk-httpd-2.2.3.so复制到APACHE安装目录下的modules目录 2.在目录modules下新建一个workers.properties文件,用记事本打开workers.properties文件,写入如下内容: worker.list = loadbalancer,tomcat1,tomcat2 #server 列表 #========controller,负载均衡控制器========

  • Under Ubuntu install and configure Apache2 Tomcat6 and MySql5 2010-06-15

    1.Apache2 Installation 1) Download: Apache2 download page: http://httpd.apache.org/download.cgi use version 2) Extract: tar-zxvf httpd-2.2.15.tar.gz 3) Installation: Execute the following command: (In general, the PREFIX replace / usr/local/apache2 /

  • PHP5.3.6 integration with apache2.2 2011-03-25

    This is a reference http://apps.hi.baidu.com/share/detail/30613159 do, and then made a partial modification php version must be correct, or can not find the part of the file A, Apache installation and configuration 1. Default installation (enter the

  • JVM instance parameter adjustment - 1 2010-07-28

    Recent progress of a project performance tuning, concurrent goal is to support the 1000 number; web container: apache2 + tomcat6 jvm: jdk6 linux x64 Procedure: status2 + spring + ibatis Cache: memcache Server: four pairs of nuclear cup 8G memory As t

  • jdk + apache + tomcat installation configuration 2010-10-12

    apache2 install apt-get install apache2 tomcat6 install apt-get install tomcat6 jdk6 install apt-get install openjdk-6-jdk tomcat6 CATALINA_BASE is / var/lib/tomcat6 page under webapps is where the release CATALINA_HOME is / usr/share/tomcat6 bin und

  • To integrate in ubuntu apache http server tomcat 2011-08-04

    Install apache2 tomcat6 libapache2-mod-jk Note that, as far as possible with the source installation to ensure that version has. sun jdk installed to load the other source. In the httpd.conf file to add ServerName 127.0.0.1 LoadModule jk_module / usr

  • ajax 怎么设置超时(一个action执行了2遍) 2014-03-01

    一个action执行了2遍 ,这个操作大致需要5分多钟才能完成,于是搜了几个可以设置超时的地方,希望对大家有所帮助 今天在测试工程时发现一个action执行了2遍 ,这个操作大致需要5分多钟才能完成,工程环境 apache2+tomcat6.0. 网上搜索发现了几个可以设置超时的地方: 1.ajax 语法去设置单位毫秒,例如: $.ajax({ url: XXX, timeout: 600000, type: 'POST', data: { }, error: function() { show

  • Apache2.2.14 and Tomcat6.0.24 integration 2010-04-20

    Integration apache2.2.14 and tomcat6.0.24 The first step: install Apache, visit http://127.0.0.1 or http://localhost to see the apache default page, the page is displayed as It works!, Shows Apache installation was successful. Apache default listenin

  • apache2.2.12 + tomcat6.0.20 integration Xiangjie 2010-08-07

    <! - [If gte mso 9]> <xml> <w:WordDocument> <w:View> Normal </ w: View> <w:Zoom> 0 </ w: Zoom> <w:TrackMoves/> < w: TrackFormatting /> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>

  • Apache2.2.4 integration with Tomcat6.0 2010-04-05

    The first step: First, of course, want to install JDK, JDK installation is very simple, just click Next you can have installed by default in C: \ Program Files \ Java \ Can modify the path, the installation is completed by the following example to se

  • ubuntu 9.10 virtual host integration under the apache2.2.12 tomcat6.0.20 Summary 2010-05-02

    0. Default apache2 and tomcat6 are packed, just install mod_jk 1.apt-get install libapache2-mod-jk 2.a2enmod jk 3. Modify default, to increase the virtual host on the interpretation of jsp JkMount / * ajp13 4. Modify tomcat6 server.xml file to increa

  • Integration Apache2.2.19 and Tomcat6.0.29 clustering and load balancing 2011-09-19

    To do a consolidation Apache2.2.19 and Tomcat6.0.29 cluster, load balancing and session sharing documents, to stay back. Also hope to give you help.

  • Apache2 and Tomcat6 integration 2010-07-24

    mark

  • Linux install configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 Detailed 2010-10-20

    Linux install configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 details Java code This to Redhat AS5, the kernel is Linux 2.6.18-8.el5 as an example, Redhat / Fedora basically the same series, the other version of Linux or both can refer to. S

  • JDK1.6.0_11 + Apache2.2 + Tomcat6.0--combined ( 2011-05-10

    This switched: http://bbs2.chinaunix.net/viewthread.php?tid=1357082 Integrated platform is Red Hat Enterprise Linux 5.1 environment: Manually install the source code package approach. apache source code package: httpd-2.2.11.tar.gz Download http://la

  • Installation under Linux configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 Detailed 2010-10-20

    Installation under Linux configuration Jdk1.6 + Tomcat6 + Apache2.2.x + jk_mod1.2 details Java code This part to Redhat AS5, the kernel is Linux 2.6.18-8.el5 for example, which Redhat / Fedora series are basically the same, or other Linux versions fo

  • Integration IIS6 TOMCAT6 2010-03-20

    Version: JDK6 IIS6 TOMCAT6 JK-1.2.20 version of the proposed integration of the same. Download to contain: http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/ Download Note: the 32-bit or 64-bit, usually under 32-bit Before the

  • Apache2.2.14 and SVN1.6.6 integration 2010-04-21

    Apache2.2.14 and SVN1.6.6 integration 1. First install the Apache server. Manually fill in their ServerInfo. The default port number is 80. 2. And then install the SVN server, you can directly install, I used the version is: Setup-Subversion-1.6.6.ms

  • php5 & apache2.2 integration 2010-04-27

    php5.3.2 integrated with apache 2.2 on windows <br /> Reference: http://www.xiaohui.com/dev/server/20070922-install-apache-mysql-php-on-vista.htm Installation apache2.2 * Install skip * Test apache2.2 Start to see if it can access Install php * Down