Apache+JServ+ojsp+SSL+PHP(IMAP+LDAP+MYSQL)InstallGuide
在参考java区netsoldier的"jsp已经稳定运行起来" 和laomie的gnijsp的安装,配置两篇文章 经过2天的不懈奋斗,终于可以正常工作了。:)
感谢两位前辈!
现把安装过程简略描述如下,和大家共享喜悦。
PS1:OS环境:RedHat6.2kernal:2.2.14-5 MEM:256MB
PS2:我的PHP4,JServ都是编译进Apache的 没有采用mod方式.
前期准备:
软件: Apache部分: Apache1.3.12http://www.apache.org ApacheJSSI1.1.2http://java.apache.org ApacheJServ1.1.2http://java.apache.org
SSL部分: mod_ssl-2.6.0-1.3.12http://www.modssl.org/source/mod_ssl-2.6.0-1.3.12 .tar.gz mm-1.0.9http://www.engelschall.com/sw/mm/mm-1.0.9.tar.gz
rsaref2.0ftp://ftp.replay.com/pub/crypto/crypto/LIBS/rsare f20.tar.Z openssl0.9.4http://www.openssl.org/source/openssl-0.9.4.tar.g z
PHP部分: PHP4.0.1pl2http://www.php.net/do_download.php?download_file= php-4.0.1pl2.tar.gz&source_site=www.php.net libwmf0.1.7http://www.csn.ul.ie/~caolan/publink/libwmf/libwm f-0.1.17.tar.gz freetype1.3.1ftp://ftp.freetype.org/pub/freetype1/freetype-1.3 .1.tar.gz zlib1.1.3http://www.cdrom.com/pub/infozip/zlib/zlib.tar.gz
pdflib3.0http://www.pdflib.com/pdflib/download/pdflib-3.0. tar.gz openldap1.2.8ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-rele ase/openldap-1.2.8.tgz imap4.5http://hkstar.Linuxberg.com/files/console/imap-4. 5.tar.Z
JAVA jdk1.2.2http://java.online.sh.cn/JDK/Sun/Linux/jdk1_2_2-l inux-i386.tar.gz jsdk2.0http://java.sun.com选择solarisandotherunix jswdk1.0.1http://java,sun.com选择solarisandotherunix ojsphttp://technet.oracle.com搜寻ojsp_10061.otn.zip
安装: Apache+JServ+PHP: 由于这些东西的参数较多 我采用每个建立一个cfg脚本配置,不用每次重新配置都要敲入所有配置参数:)
步骤:
拷贝所有的包到/tmp下面,然后按步骤解开压缩包,最方便的是用mc来拷贝:) 注意:以下路径均为我本机的路径,以mc操作,后面的配置文件也以此为参考 mc可以直接进入tar以及gz包,然后就可以直接F5(Copy)了。
#mc(changeleftwinto/tmp,rightto/opt/install) 01.mm-1.0.9.tar.gzto/opt/install/lib/mm/mm-1.0. 9 02.rsaref20.tar.Zto/opt/install/lib/rsa/rsaref 20 03.openssl-0.9.4.tar.gzto/opt/install/lib/openssl-0. 9.4 04.mod_ssl-2.6.0-1.3.12.tar.gzto/opt/install/apache/mod/mod _ssl-2.6.0-1.3.12
05.openldap-1.2.8.tgzto/opt/install/ldap/openldap- 1.2.8 06.imap-4.5.tar.Zto/opt/install/mail/imap-4.5
07.pdflib-3.0.tar.gzto/opt/install/pdf/pdflib-3.0
08.zlib.tar.gzto/opt/install/pdf/zlib-1.1.3
09.libwmf-0.1.17.tar.gzto/opt/install/lib/wmf/libwmf
10.freetype-1.3.1.tar.gzto/opt/install/lib/freetype.t tf/freetype-1.3.1
11.jdk1_2_2-linux-i386.tar.gzto/usr/local/jdk1.2.2 12.jsdk20-solaris2-sparc.tar.Zto/usr/local/JSDK20 13.jswdk1_0_1-solsparc.tar.Zto/usr/local/jswdk-1.0.1 14.ojsp_10061_otn_zipto/usr/local/ojsp
15.apache_1.3.12.tar.gzto/opt/install/apache/apache_ 1.3.12 16.ApacheJSSI-1.1.2to/opt/install/apache/ApacheJ SSI-1.1.2 17.ApacheJServto/opt/install/apache/ApacheJ Serv-1.1.2 18.php-4.0.1pl2to/opt/install/php/php-4.0.1p l2
配置文件 注意:没有特别说明的就是用的缺省的configure没有任何参数。 所有cfg文件都需要由执行属性。
[root@infoinstall]#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@infoinstall]#catlib/mm/mm-1.0.9/cfg ./configure--disable-shared
[root@infoinstall]#catlib/openssl/openssl-0.9.4/cfg ./config\ --prefix=/usr/local/openssl\ --openssldir=/usr/local/openssl\ -L`pwd`/../../rsa/rsaref2.0/localrsaref\ -fPIC
[root@infoinstall]#catapache/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@infoinstall]#catapache/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
exportclasspath exportCLASSPATH
PATH/usr/local/jdk/bin:$PATH
exportPATH
#.~/.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.2Make;MakeInstall;
12.php-4.0.1pl2 ./cfg;make;makeinstall
13.mod_ssl-2.6.0-1.3.12.tar.gz ./cfg;
14.apache_1.3.12 make;makeinstall;
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
|