rhel5u5
所需软件:
tar
zxvf apache-tomcat-5.5.33.tar.gz
tomcat-connectors-1.2.32-src.tar.gz
jdk-6u21-linux-x64-rpm.bin
安装前准备:
为防止中文乱码 安装中文字符集,为防止漏装我这里直接用yum
yum -y groupinstall chinese-support
编辑/etc/sysconfig/i18n 内容如下:
LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en:zh_CN.GB18030"
SYSFONT="latarcyrheb-sun16"
是修改生效:
. /etc/sysconfig/i18n
查看是否生效
修改字符集前
# echo $LANG
en_US.UTF-8
修改字符集后
# . /etc/sysconfig/i18n
# echo $LANG
zh_CN.GB18030
安装步骤:
1.安装jdk
# chmod 755 jdk-6u21-linux-x64-rpm.bin
# ./jdk-6u21-linux-x64-rpm.bin
# ln
-s /usr/java/jdk1.6.0_21/ /usr/jdk
2.安装tomcat
# tar zxvf apache-tomcat-5.5.33.tar.gz
# mv apache-tomcat-5.5.33 /usr/local/tomcat
3.安装 tomcat-connect
# tar zxvf tomcat-connectors-1.2.32-src.tar.gz
# cd tomcat-connectors-1.2.32-src/native/
# ./configure --with-apxs=/usr/local/apache/bin/apxs --with-java-home=/usr/jdk/
# make && make install
tomcat配置:
1.将tomcat-connect的两个模板文件拷到apache/conf目录下也可以自己编写这两个文件
cp tomcat-connectors-1.2.32-src/conf/{httpd-jk.conf,workers.properties} /path/to/apache/conf/
httpd-jk.conf 样本
JkWorkersFile /usr/local/apache/conf/workers.properties
# Where to put jk logs
JkLogFile /usr/local/apache/logs/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"
JkMount / tomcat1
JkMount /* tomcat1
workers.properties样本
worker.list=tomcat1
worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
worker.tomcat1.lbfactor=50
worker.tomcat1.cachesize=10
worker.tomcat1.cache_timeout=600
worker.tomcat1.socket_keepalive=1
worker.tomcat1.socket_timeout=300
2.在apache的配置文件httpd.conf加入
Include conf/httpd-jk.conf
更多文章请参阅