1. Apache与Tomcat连接方式
  选用Apache理由:
  (1)提升对静态文件的处理性能
  (2)利用web服务器来做负载均衡及容错
  (3)无缝的升级应用程序
连接方式:
   (1)JK方式
   (2)http_proxy方式
   (3)ajp_proxy方式

1). Java安装:
chmod +x jdk-6u17-linux-i586-rpm.bin
./jdk-6u17-linux-i586-rpm.bin
默认安装目录:/usr/java/jdk1.6.0_17/
制作软链接:ln -s /usr/java/jdk1.6.0_17/ /usr/local/java
设置Java环境变量, 在配置文件:vi /etc/profile中加入:
JAVA_HOME=/usr/java/jdk1.6.0_17
CLASSPATH=/usr/java/jdk1.6.0_17/lib/dt.jar:/usr/java/jdk1.6.0_17/lib/tools.jar
PATH=/usr/java/jdk1.6.0_17/bin:$PATH
export PATH JAVA_HOME CLASSPATH
使之立即生效:source /etc/profile
2). 安装mysql数据库
tar zxvf mysql-5.1.41-linux-i686-icc-glibc23.tar.gz
./confiure --prefix=/...
make && make install
groupadd mysql
useradd -g mysql mysql
(
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql  //以mysql用户初始化
shell> chown -R root .
shell> chown -R mysql data
shell> bin/mysqld_safe --user=mysql &
)
mysql启动:/usr/local/mysql/bin/mysqld_safe --user=mysql &
netstat -ant查看mysql的端口号3306
cp support-files/mysql.server /etc/rc.d/init.d/mysqld

 
附录:
1. JDK6: http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/VerifyItem-Start/jdk-6u17-linux-i586-rpm.bin?BundledLineItemUUID=PkNIBe.o_sgAAAElIvIateS8&OrderID=i6BIBe.o8T0AAAElD_IateS8&ProductID=lBFIBe.oSOMAAAEkGehn5G0y&FileName=/jdk-6u17-linux-i586-rpm.bin
2. tomcat:  http://tomcat.apache.org/download-60.cgi?Preferred=http://labs.xiaonei.com/apache-mirror
3. Apache: http://httpd.apache.org/download.cgi
在安装apache的时候 ,可能出现【 make: *** [all-recursive] 错误 1】错误,是由于缺少apr的原因, 解决方案如下:
在fedora8上安装apache
    >tar -zxvf httpd-2.2.8.tar.gz
    >cd httpd-2.2.8
    >./configure --prefix=/usr/local/httpd
    >make
    make的时候出现下面错误,以前配没遇到过这问题
    libtool: link: `passwd/apr_getpass.lo' is not a valid libtool object
    make[3]: *** [libapr-1.la] 错误 1
    make[3]: Leaving directory `/root/httpd-2.2.8/srclib/apr'
    make[2]: *** [all-recursive] 错误 1
    make[2]: Leaving directory `/root/httpd-2.2.8/srclib/apr'
    make[1]: *** [all-recursive] 错误 1
    make[1]: Leaving directory `/root/httpd-2.2.8/srclib'
    make: *** [all-recursive] 错误 1
    后来发现原来是缺少 apr & apr-util.
    去http://apr.apache.org/ 下来最新的apr-1.2.12-tar.gz和apr-util-1.2.12.tar.gz
    >tar -zxvf apr-1.2.12-tar.gz
    >cd apr-1.2.12
    >./configure --prefix=/usr/local/apr-httpd/
    >make & make install
    >tar -zxvf apr-util-1.2.12-tar.gz
    >cd apr-util-1.2.12
    >./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/
    >make & make install
    回到apache编译目录
    >./configure --prefix=/usr/local/httpd/ --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/
    >make
    >make install
    问题解决。


4. apr: http://apr.apache.org/download.cgi?Preferred=http://labs.xiaonei.com/apache-mirror
5. Mysql: http://dev.mysql.com/downloads/
下载5.5.2版本的mysql数据库:wget http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-community-debuginfo-5.5.2_m2-1.rhel5.i386.rpm/from/http://mysql.cs.pu.edu.tw/

java连接:
http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-6.1.10.tar.gz/from/http://mysql.mirror.tw/
7. PHP:  http://www.php.net/downloads.php