tomcat-connectors-1.2.23
本例中将所有软件装入/home/www文件夹中
安装apache
进入源码包所在的文件夹(本例中为/home/install)
#cd /home/install
#tar zxvf httpd-2.2.4.tar.gz
#cd httpd-2.2.4
#./configure --prefix=/home/www/apache --enable-module=most --enable-shared=max --enable-so
#make && make install
#vi /etc/rc.d/init.d/httpd
# 获取网络配置 #!/bin/bash # Startup script for the Apache Web Server # 包含函数库 . /etc/rc.d/init.d/functions # 获取网络配置 . /etc/sysconfig/network
# 检测 NETWORKING 是否为 "yes"
[ "${NETWORKING}" = "no" ] && exit 0 # apache安装目录 APACHE=/home/www/apache # 启动服务函数 start() { echo $"Starting httpd service: " $APACHE/bin/apachectl start RETVAL=$? echo } # 关闭服务函数 stop() { echo $"Stopping httpd service: " $APACHE/bin/apachectl stop RETVAL=$? echo } # 根据参数选择调用 case "$1" in start) start ; stop) stop ;; restart) stop start ;; *) echo $"Usage: $0 start|stop|restart" exit 1
esac
exit 0
#chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Web Server
|
#chmod 755 httpd
#chkconfig –level 345 httpd on
#service httpd restart
#groupadd mysql
#useradd –g mysql mysql
#cd /home/www/mysql
#scripts/mysql_install_db –user=mysql
#chown –R root .
#chown –R myssql data
#chgrp –R mysql .
#bin/mysqld_safe –user=mysql &
#./bin/mysqladmin –u root password
#cp support-files/mysql.server /etc/init.d/mysql
#vi /etc/init.d/mysql
basedir=/home/www/mysql
datadir=/home/www/mysql/data |
#chkconfig –level 345 mysql on
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3 |
<?
Phpinfo()
?>
|
export JAVA_HOME=/usr/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib
|
/home/www/tomcat/bin/startup.sh
|
#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 /home/www/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 /home/www/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" # Send everything for context /examples to worker named worker1 (ajp13) JkMount /*.jsp worker1 |
# 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 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.reclycle_timeout=300 |
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">