服务器技术

 首页 > 服务器技术 > apache > 经典的apache+tomcat虚拟机配置|root@longbank-Apache教程

经典的apache+tomcat虚拟机配置|root@longbank-Apache教程

分享到:
【字体:
导读:
          ...

安装所需文件:
jdk-1_5_0_06-linux-i586.rpm
http-2.2.0.tar.gz
apache-tomcat-5.5.16.tar.gz
jakarta-tomcat-connectors-jk-1.2.6.tar.gz
将安装软件都放在一个目录下,我暂且放在/usr/local下
(1)JDK的安装
[root@longbank]cd /usr/local
[root@longbank]rpm ivh  jdk-1_5_0_06-linux-i586.rpm
[root@longbank]vi /etc/profile
配置JDK   进入界面后按 i 
JAVA_HOME=/usr/java/jdk1.5.0_06
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOEM/lib/dt.jar
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC CLASSPATH JAVA_HOME
然后按Esc,接着同时按下shift与:,输入wq保存退出
(1) apache的安装:
[root@longbank] cd /usr/local
[root@longbank] tar zxvf http-2.2.0.tar.gz
[root@longbank] cd httpd-2.2.0
[root@longbank] ./configure --prefix=/usr/local/apache --with-mpm=worker --enable-mods-shared=all
                 --enable-proxy --enable-proxy-http --enable-proxy-ajp --enable-proxy-balancer
                 --enable-proxy-ftp --enable-proxy-connect
                 --enable-so --enable-modules=so
[root@longbank] make
[root@longbank] make install
[root@longbank]vi /etc/profile
配置tomcat  进入界面后按 i 
TOMCAT_HOME=/usr/local/apache-tomcat-5.5.16
在export 中加入TOMCAT_HOME
然后按Esc,接着同时按下shift与:,输入wq保存退出
 
(2)tomcat的安装:
[root@longbank] cd /usr/local
[root@longbank] tar zxvf apache-tomcat-5.5.16.tar.gz
[root@longbank]
(3) Connectors的安装:
[root@longbank] tar zxvf jakarta-tomcat-connectors-jk-1.2.6.tar.gz
[root@longbank] cd jakarta-tomcat-connectors-jk-src/jk/native
[root@longbank] ./buildconf.sh
[root@longbank] ./configure --with-apxs=/usr/local/apache/bin/apxs
[root@longbank] make
[root@longbank] make install
  
[root@longbank] vi /usr/local/apache/conf/httpd.conf
 
listen 80 改为:listen 192.168.10.83:80
注释掉:DocumentRoot /usr/local/apache/htdocs
注释掉:serverAdmin
注释掉:serverName
 
在文件末尾添加如下内容:
 
#add mod_jk module
LoadModule jk_module modules/mod_jk.so
# Update this path to match your modules location
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
 JkWorkersFile /usr/local/apache/conf/workers.properties
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
 JkLogFile     /usr/local/apache/conf/mod_jk.log
# Set the jk log level [debug/error/info]
 JkLogLevel    info
# Select the log format
 JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
 JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
 JkRequestLogFormat     "%w %V %T"
# Send everything for context /examples to worker named worker1 (ajp13)
 JkMount /*.jsp worker1
 JkMount /server/* worker1
 
新建此文件/usr/localapache/conf/workers.properties 添加如下内容:
# Define 1 real worker using ajp13
 worker.list=worker1
 # Set properties for worker1 (ajp13)
 worker.worker1.type=ajp13
 worker.worker1.host=localhost
 worker.worker1.port=8009
 worker.worker1.lbfactor=50
 worker.worker1.cachesize=10 "经典的apache+tomcat虚拟机配置"由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Server/Apache/17979.html

分享到:
快速架设apache/vsftpd/samba/sendmail服...
这意味着我们的someone@foo.org发信的时候,sendmail将会把它的信封伪装为someone@masq.com。这对于统一整个域的电子邮件是非常重要的。 virtusertable 允许在同一个主机上使用多个虚拟域。参考下一节。例如: FEATURE(`virtusertable,`hash –o /etc/mail/virtusertable) nullclient 这是一个特殊情况--它生成一个除了支持...
Linux上安装Oracle、PHP和Apache|安装-Ap...
软件需求 软件 版本 URL Oracle RDBMS 9.2 /software/products/oracle9i/index.html ...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……