windows2003+Apache2.2.4 +mod_perl2.0.3 +Perl5.8.8
时间:2007-06-15 来源:easyworld
apache http://httpd.apache.org/
perl http://www.perl.org
安装好,比如
apache 安装在 e:/usr/apache2
perl 安装在 e:/usr/perl (为什么是usr,我觉得这样比较符合linux下的习惯)
ActivePerl安装完成后会自动为用户设置好环境变量的PATH项,如果没有perl的路径,自己添加. 2.接下来是安装mod_perl,我采用的包安装法,在命令行下输入
ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd |
3.建立extra.pl文件保存到e:/usr/apache2/conf 下
内容如下:
use ModPerl::Util (); |
4.修改http.conf,增加以下内容
LoadFile "e:/usr/Perl/bin/perl58.dll" |
5.重启apahce2
net stop apache2 |
6.测试
在脚本目录下建立test.pl 内容如下
## printenv -- demo CGI program which just prints its environment |
通过http://localhost/perl/test.pl如果能够正常输出
Environment variables |
则说明配置成功
7.自己编写第一个脚本,当然是hello.pl
print "Content-type: text/html\n\n"; |
输出
hello world |
- 以上参照
http://perl.apache.org/docs/2.0/os/win32/index.html
及网上其他网友的经验和本人试验集合而成