JSP、PHP与JAVA融合的开发环境之二

时间:2010-01-08 15:40:22   来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:d *jk2*/jk/native2//进入连接器编译目录#./buildconf.sh//运行配置脚本#./configure --with-apxs2=/usr/local/apache/bin/apxs--enable-jni --enable-EAPI#make //编译模块#cd ~jim/src/*jk2*/jk/build/jk2/apache2//进入编译好模块的目录#cp *.so /usr/local/apache/modules///将模块拷贝到Apache目录#cp -R ...
  正文:

七.安装Tomcat

1.执行以下命令

#cd *jk2*/jk/native2
//进入连接器编译目录
#./buildconf.sh
//运行配置脚本
#./configure --with-apxs2=/usr/local
/apache/bin/apxs
--enable-jni --enable-EAPI
#make //编译模块
#cd ~jim/src/*jk2*/jk/build/jk2/apache2
//进入编译好模块的目录
#cp *.so /usr/local/apache/modules/
//将模块拷贝到Apache目录
#cp -R jakarta-tomcat-5.0.19 /usr/local/tomcat
//安装Tomcat
#touch /usr/local/apache/logs/shm.file
//建立共享内存文件

2.编辑以下文件

/usr/local/apache/conf/httpd.conf
  LoadModule jk2_module modules/mod_jk2.so
  JkSet config.file
/usr/local/apache/conf/workers2.properties
  DocumentRoot "/usr/local/tomcat/webapphotoshop/ target=_blank class=infotextkey>ps"
  
  
  /usr/local/tomcat/webapps/jsp-examples/for.jsp
  
  
  /usr/local/tomcat/conf/jk2.propertie
  handler.list=request,container,channelSocket
  channelSocket.port=8009
  channelSocket.address=127.0.0.1
  channelSocket.maxPort=port+10
  
  /usr/local/apache/conf/workers2.properties
  [shm]
  file=/usr/local/apache/logs/shm.file
  size=1048576
  [workerEnv:]
  info=Global server options
  timing=1
  debug=0
  [channel.socket:localhost:8009]
  port=8009
  host=127.0.0.1
  [ajp13:localhost:8009]
  channel=channel.socket:localhost:8009
  [uri:/*.jsp]
  worker=ajp13:localhost:8009
  
  /etc/rc.d/init.d/httpd
  #!/bin/sh
  
  # chkconfig:2345 92 12
  # description:Starting
Apache and Tomcat Server
  
  LD_LIBRARY_PATH=/usr/java/j2sdk1.4.2_04
/jre/lib/i386:/usr/java/j2sdk1.4.2_04
/jre/lib/i386/server
  export LD_LIBRARY_PATH
  
  CATALINA_BASE=/usr/local/tomcat
  export CATALINA_BASE
  
  CATALINA_HOME=/usr/local/tomcat
  export CATALINA_HOME
  
  APACHE_HOME=/usr/local/apache
  export APACHE_HOME
  
  JAVA_HOME=/usr/java/j2sdk1.4.2_04
  export JAVA_HOME
  
  PROFILEDIR=/var/run
  
  case "$1" in
  start)
  
  if [ -f $PROFILEDIR/Tomcat5_Apache2 ];
then
  echo "Running Tomcat5_Apache2"
  else
  if [ -f $CATALINA_HOME/bin/startup.sh ];
then
  if [ -f $APACHE_HOME/bin/apachectl ];
then
  "$CATALINA_HOME/bin/startup.sh"
  echo "Startting Tomcat5"
  sleep 3
  echo "Startting Apache2"
  $APACHE_HOME/bin/apachectl start
  echo "."
  touch $PROFILEDIR/Tomcat5_Apache2
  else
  echo "Apache File Not Founds"
  fi
  else
  echo "Tomcat File Not Founds"
  fi
  fi
  ;;
  
  stop)
  if [ -f $PROFILEDIR/Tomcat5_Apache2 ];
then
  if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
  if [ -f $APACHE_HOME/bin/apachectl ];
then
  "$CATALINA_HOME/bin/shutdown.sh"
  echo "Stopping Tomcat5"
  sleep 3
  echo "Stopping Apache2"
  $APACHE_HOME/bin/apachectl stop
  rm $PROFILEDIR/Tomcat5_Apache2
  else
  echo "Apache File Not Founds"
  fi
  else
  echo "Tomcat File Not Founds"
  fi
  else
  echo "Not Running Tomcat5_Apache2"
  fi
  ;;
  *)
  echo "Usage; `basename $0`
{start|stop}" 1>&2
  exit 1
  ;;
  esac
  exit 0

3.设置自动启动


来源:http://www.002pc.com/master/College/Programming/PHP/11655.html

来顶一下
近回首页
返回首页
收藏到:

关于《JSP、PHP与JAVA融合的开发环境之二》文章的评论

共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面

随机文章

    SQL Error: select * from ***_ecms_article where classid='86' and checked=1 order by rand() limit 10

顶出来的热门

    SQL Error: select * from ***_ecms_article where classid='86' and checked=1 order by diggtop desc,id desc limit 10
站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td