PS1:OS环境:RedHat 6.2 kernal:2.2.14-5
MEM:256MB
PS2:我的PHP4,JServ都是编译进Apache的
没有采用mod方式.
前期准备:
软件:
Apache 部分:
Apache 1.3.12 http://www.apache.org
Apache JSSI 1.1.2 http://java.apache.org
Apache JServ 1.1.2 http://java.apache.org
SSL 部分:
mod_ssl-2.6.0-1.3.12 http://www.modssl.org/source/mod_ssl-2.6.0-1.3.12
.tar.gz
mm-1.0.9 http://www.engelschall.com/sw/mm/mm-1.0.9.tar.gz
rsaref2.0 ftp://ftp.replay.com/pub/crypto/crypto/LIBS/rsare
f20.tar.Z
openssl 0.9.4 http://www.openssl.org/source/openssl-0.9.4.tar.g
z
PHP 部分:
PHP 4.0.1pl2 http://www.php.net/do_download.php?download_file=
php-4.0.1pl2.tar.gz&source_site=www.php.net
libwmf 0.1.7 http://www.csn.ul.ie/~caolan/publink/libwmf/libwm
f-0.1.17.tar.gz
freetype 1.3.1 ftp://ftp.freetype.org/pub/freetype1/freetype-1.3
.1.tar.gz
zlib 1.1.3 http://www.cdrom.com/pub/infozip/zlib/zlib.tar.gz
pdflib 3.0 http://www.pdflib.com/pdflib/download/pdflib-3.0.
tar.gz
openldap 1.2.8 ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-rele
ase/openldap-1.2.8.tgz
imap 4.5 http://hkstar.Linuxberg.com/files/console/imap-4.
5.tar.Z
JAVA
jdk 1.2.2 http://java.online.sh.cn/JDK/Sun/Linux/jdk1_2_2-l
inux-i386.tar.gz
jsdk 2.0 http://java.sun.com 选择 solaris and other unix
jswdk 1.0.1 http://java,sun.com 选择 solaris and other unix
ojsp http://technet.oracle.com 搜寻 ojsp_10061.otn.zip
安装:
Apache+JServ+PHP:
由于这些东西的参数较多
我采用每个建立一个cfg脚本配置,不用每次重新配置都要敲入所有配置参数:)
步骤:
拷贝所有的包到/tmp下面,然后按步骤解开压缩包,最方便的是用mc来拷贝:)
注意:以下路径均为我本机的路径,以mc操作,后面的配置文件也以此为参考
mc可以直接进入tar以及gz包,然后就可以直接F5(Copy)了。
# mc (change left win to /tmp,right to /opt/install)
01. mm-1.0.9.tar.gz to /opt/install/lib/mm/mm-1.0.
9
02. rsaref20.tar.Z to /opt/install/lib/rsa/rsaref
20
03. openssl-0.9.4.tar.gz to /opt/install/lib/openssl-0.
9.4
04. mod_ssl-2.6.0-1.3.12.tar.gz to /opt/install/apache/mod/mod
_ssl-2.6.0-1.3.12
05. openldap-1.2.8.tgz to /opt/install/ldap/openldap-
1.2.8
06. imap-4.5.tar.Z to /opt/install/mail/imap-4.5
07. pdflib-3.0.tar.gz to /opt/install/pdf/pdflib-3.0
08. zlib.tar.gz to /opt/install/pdf/zlib-1.1.3
09. libwmf-0.1.17.tar.gz to /opt/install/lib/wmf/libwmf
10. freetype-1.3.1.tar.gz to /opt/install/lib/freetype.t
tf/freetype-1.3.1
11. jdk1_2_2-linux-i386.tar.gz to /usr/local/jdk1.2.2
12. jsdk20-solaris2-sparc.tar.Z to /usr/local/JSDK20
13. jswdk1_0_1-solsparc.tar.Z to /usr/local/jswdk-1.0.1
14. ojsp_10061_otn_zip to /usr/local/ojsp
15. apache_1.3.12.tar.gz to /opt/install/apache/apache_
1.3.12
16. ApacheJSSI-1.1.2 to /opt/install/apache/ApacheJ
SSI-1.1.2
17. ApacheJServ to /opt/install/apache/ApacheJ
Serv-1.1.2
18. php-4.0.1pl2 to /opt/install/php/php-4.0.1p
l2
配置文件
注意:没有特别说明的就是用的缺省的configure没有任何参数。
所有cfg文件都需要由执行属性。
[root@info install]# cat /opt/install/php/php-4.0.1pl2/cfg
./configure
--enable-force-cgi-redirect
--with-apache=../../apache/apache_1.3.12
--with-pdflib=/usr/local
--with-zlib-dir=/usr
--with-jpeg-dir=/usr/local
--with-tiff-dir=/usr/local
--with-mysql=/usr/local/mysql
--without-gd
--enable-magic-quotes
--disable-debug
--enable-ftp
--with-dbase
--with-zlib=/usr
--with-imap=/usr/local/imap
--with-ldap
--with-java=/usr/local/jdk
# --with-servlet=/usr/local/jsdk
(上面一行千万不要加,我开始加的,PHP可以编译通过不过无法河apache整合)
[root@info install]# cat lib/mm/mm-1.0.9/cfg
./configure --disable-shared
[root@info install]# cat lib/openssl/openssl-0.9.4/cfg
./config
--prefix=/usr/local/openssl
--openssldir=/usr/local/openssl
-L`pwd`/../../rsa/rsaref2.0/local rsaref
-fPIC
[root@info install]# cat apache/ApacheJServ-1.1.2/cfg
#!/bin/sh
./configure
--prefix=/usr/local/apache/jserv
--with-apache-src=../apache_1.3.12
--with-logdir=/usr/local/apache/log
--enable-EAPI
--with-jdk-home=/usr/local/jdk
--with-JSDK=/usr/local/jsdk/lib/jsdk.jar
--disable-debugging
[root@info install]# cat apache/mod/mod_ssl-2.6.0-1.3.12/cfg4
#!/bin/sh
./configure
--with-apache=../../apache_1.3.12
--with-ssl=/usr/local/openssl
--with-rsa=../../../lib/rsa/rsaref2.0/local
--with-mm=../../../lib/mm/mm-1.0.9
--prefix=/usr/local/apache
--disable-rule=SSL_COMPAT
--enable-rule=SSL_SDBM
--enable-rule=SSL_EXPERIMENTAL
--enable-rule=SSL_VENDOR
--activate-module=src/modules/php4/libphp4.a
--activate-module=src/modules/jserv/libjserv.a
编译安装:
步骤:
# ln -s /usr/local/jdk1.2.2 /usr/local/jdk
# ln -s /usr/local/JSDK20 /usr/local/jsdk
# ln -s /usr/local/jswdk-1.0.1 /usr/local/jswdk
# ln -s /usr/local/jdk1.2.2/jre /usr/local/jre
# vi ~/.profile
添加 classpath 环境变量
JDK_LIB=/usr/local/jdk/lib
JSDK_LIB=/usr/local/jsdk/lib
JSWDK_LIB=/usr/local/jswdk/lib
classpath=$JDK_LIB/rt.jar:$JDK_LIB/tools.jar:$JSDK_LIB/jsdk.jar:$JSWDK
/lib/servlet.jar:$JSWDK/lib/jspengine.jar:$JSWDK_LIB/xml.jar
CLASSPATH=$classpath
export classpath
export CLASSPATH
PATH /usr/local/jdk/bin:$PATH
export PATH
# . ~/.profile
注意:最好不要用系统安装的kafee,移除/usr/bin/java* /usr/bin/jar
附加应用:
(在刚才展开的几个源码目录下面运行./cfg,或者./configure,然后编译安装)
01. openldap-1.2.8
02. imap-4.5
03. zlib-1.1.3
04. libwmf-0.1.17
05. freetype-1.3.1
06. pdflib-3.0
SSL相关应用:
(在刚才展开的几个源码目录下面运行./cfg,或者./configure,然后编译安装)
07. mm-1.0.9
08. rsaref20
09. openssl-0.9.4
Apache+JServ+JSSI+PHP4:
(所有动作均在各自源码目录下面)
10. 先在apache_1.3.12的源码目录下面以./configure --prefix=/usr/local/a
pache 配置一下
11. 然后配置ApacheJServ-1.1.2 Make;Make Install;
12. php-4.0.1pl2
./cfg;make;make install
13. mod_ssl-2.6.0-1.3.12.tar.gz
./cfg;
14. apache_1.3.12
make;make install;
15. 按照ApacheJSSI的说明修改/usr/local/apache/jserv/etc/jserv.conf,以及
拷贝ApacheJSSI.jar
到/usr/local/apache/jerv/libexec下面
16. 按照ojsp的说明(在/usr/local/ojsp/index.htm)修改
/usr/local/apache/jserv/etc/jserv.conf
和
/usr/local/apache/jserv/etc/jserv.properties
17. 在 /usr/local/apache/conf/httpf.conf 中添加
Include /usr/local/apache/jserv/etc/jserv.conf