歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux資訊 >> Linux業界

Linux下的Apache+JServ+ojsp+SSL+PHP(IMAP+LDAP+MYSQL)的安裝(一)

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




Copyright © Linux教程網 All Rights Reserved