apache+jserv+ojsp+ssl+php(imap+ldap+mysql) install guide
在参考java区netsoldier的"jsp已经稳定运行起来"
和laomie的gnijsp的安装,配置两篇文章
经过2天的不懈奋斗,终于可以正常工作了。:)
感谢两位前辈!
现把安装过程简略描述如下,和大家共享喜悦。
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