整合Apache2.2.3与tomcat5.5.20

Category : 工作学习 / Tags : , , / Date : 2006.10.22 / /

一. 有关说明
  运行环境: RedHat Enterprise AS4.0 Update2
  本文的目的是在RH4环境下用JK整合Apache和Tomcat。apache2.2.3是目前较新的版本。和apache2.0版本比较,它首先需要安装apr-1.2.7.tar和 apr-util-1.2.7.tar才能正常的运行。
   
  软件环境:  
  1、版本号:
  Apache: 2.2.3
  Tomcat: 5.5.20
  jk:1.2.19
  j2sdk: 1.5.0.08
  
  2、下载文件:
  httpd-2.2.3.tar
  apache-tomcat-5.5.20.tar
  tomcat-connectors-1.2.19-src.tar
  jdk-1_5_0_08-linux-i586.bin
  
  3、安装位置:
  apr->/usr/local/apr-httpd/
  apr-util->/usr/local/apr-util-httpd/
  Apache -> /usr/local/apache2
  Tomcat -> /usr/local/tomcat
  jdk -> /usr/local/jdk1.5.0_08
  jk -> /usr/local/tomcat-connectors-1.2.19-src

二. 安装步骤
  1、安装jdk
  

  # cd /usr/local/java
  # chmod u+x jdk-1_5_0_08-linux-i586.bin
  # ./jdk-1_5_0_08-linux-i586.bin

  运行以下执行代码将得到一个测试结果,显示版本,说明java环境建立成功!
  

  # cd jdk1.5.0_08/bin
  # ./java -version

  (注意:tomcat5.5的必须有jdk1.5这个版本支持)

  2、apache安装
  2.1、安装:apr-1.2.7和apr-util-1.2.7
  #解开apache安装包
   

   #tar -zxvf httpd-2.2.3.tar.gz

  # Build and install apr 1.2.7
   

   # cd httpd-2.2.3/srclib/apr
   # ./configure –prefix=/usr/local/apr-httpd/
   # make
   # make install

  # Build and install apr-util 1.2.7
   

   # cd httpd-2.2.3/srclib/apr-util
   # ./configure –prefix=/usr/local/apr-util-httpd/ –with-apr=/usr/local/apr-httpd/
   # make
   # make install

  # Configure httpd
   

   # cd /usr/local/httpd-2.2.3
   # ./configure –with-apr=/usr/local/apr-httpd/ –with-apr-util=/usr/local/apr-util-httpd/

  2.2、安装:apache
  

  # cd /usr/local/httpd-2.2.3
  #./configure –prefix=/usr/local/apache2 –enable-mods-shared=all –enable-so
  #make  
  #make install

  
  2.3、查看编译进apache的模块:
  

  #cd /usr/local/apache2/bin
  #httpd -l
   Compiled in modules:
   core.c
   prefork.c
   http_core.c
   mod_so.c

  (注:看到mod_so.c这个模块,就说明能支持DSO)

  2.4、配置httpd.conf
  2.4.1、在配置文件中加入要监听的ip和端口。
   

   #cd /usr/local/apache2/conf
   #vi httpd.conf

   # Listen: Allows you to bind Apache to specific IP addresses and/or
   # ports, instead of the default. See also the <VirtualHost>
   # directive.
   #
   # Change this to Listen on specific IP addresses as shown below to
   # prevent Apache from glomming onto all bound IP addresses.
   #
   #Listen 12.34.56.78:80
   Listen 192.168.10.2:80(这就是我们要监听的ip和端口)



无觅相关文章插件,快速提升流量

Pages: 1 2 3

Comments

One Response to “整合Apache2.2.3与tomcat5.5.20”

Leave a Reply

You must be logged in to post a comment.

传奇 似水流年 绽放 风筝 八月照相馆