在这里讨论这个问题,仅是为了研究,我个人认为,在unix上,让apache支持asp无有任何实际意义
如果以前是在win上开发的asp,我想你就让到在win上好好用吧,不用费劲的移植到unix上了
我是在solaris上测试的安装,其它系统,freebsd,linux以及sco我想也差不多,忘大家测时候能反馈给我你的结果,谢谢
好了,让我们开始吧
下载相关软件
apache_1.3.27.tar 下载之http之//www.apache.org/dist
Apache之ASP之2.49.tar 下载之http之//cpan.org/modules/by之module/Apache/
mod_perl之1.27.tar 下载之http之//perl.apache.org/download/index.html
stable.tar(perl之5.8.0) 下载之http之//www.cpan.org/src/
把上面的软件下载到1个目录,如test
1之解压
#tar xvf apache_1.3.27.tar
#tar xvf Apache之ASP之2.49.tar
#tar xvf mod_perl之1.27.tar
2之安装apache
为了以DSO的方法安装mod_perl,所以要有so模块
#cd apache_1.3.27
#./configure 之之prefix=/usr/local/apache
#make
#make install
上面这样编译会有1些modules加不进来,我只好手动指定modules了,大家用下面的命令安装apache
#./configure 之之prefix=/usr/local/apache 之之enable之module=auth_anon 之之enable之module=auth_dbm 之之enable之module=autoindex 之
之enable之module=cgi 之之enable之module=expires 之之enable之module=expires 之之enable之module=proxy 之之enable之module=rewrite 之
之enable之module=so
#make
#make install
检查安装的模块
#cd /usr/local/apache/bin/httpd 之l
Compiled之in modules之
http_core.c
mod_env.c
mod_log_config.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_access.c
mod_auth.c
mod_auth_anon.c
mod_auth_dbm.c
mod_proxy.c
mod_expires.c
mod_so.c
mod_setenvif.c
suexec之 disabled; invalid wrapper /usr/local/apache/bin/suexe
3之安装mod_perl
% make 之v
% gcc 之v
% perl 之v
安装perl
我得perl版本不够,所以我升级了1下perl的版本,现在是v5.8.0
下载http之//www.cpan.org/src/stable.tar
#tar xvf stable.tar
#cd perl之5.8.0/
#make
#make install
到sunfreeware下载pkg的安装也可以,可能还更简单
#cd mod_perl之1.27
看看DSO编译的语法
#grep DSO Makefile.PL
照猫画虎
#perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 USE_DSO=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs
#make
#make install
测试mod_perl模块
启动apache
#telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
输入get Head /http /1.0
HTTP/1.1 400 Bad Request
Date之 Wed, 25 Dec 2002 03之32之32 GMT
Server之 Apache/1.3.27 (Unix) mod_perl/1.27
ok,mod_perl加上了
给perl安装asp模块,1张方法是CPAN安装,1种是常规安装
CPAN安装
#perl 之MCPAN 之e shell
cpan> install CPAN
...
Installing the Apache之之ASP bundle will automatically install all the modules
Apache之之ASP is dependent on as well as Apache之之ASP itself. If you have
trouble installing the bundle, then try installing the necessary modules one
at a time之
cpan> install MLDBM
cpan> install MLDBM之之Sync
cpan> install Digest之之MD5
cpan> install Apache之之ASP
For extra/optional functionality in Apache之之ASP 2.31 or greater, like
support for FormFill, XSLT, or SSI, you can install this bundle via CPAN之
cpan> install Bundle之之Apache之之ASP之之Extra
也可以用常规的方法安装asp模块
Otherwise, just copy ASP.pm to
$PERLLIB/site/Apache
> perl Makefile.PL
> make
> make test
> make install
安装完毕,进行测试
在htdocs里vi1个test.asp,内容如下
For loop incrementing font size之
Size =
http之//202.106.185.101/test.asp
大家可以到这里看看效果
good luck!
