2010년 4월 5일 월요일

window + apache2 + perl 5 설치

- Perl 설치
 ActivePerl : http://www.activestate.com/store/activeperl/download/


- mod_perl.so 설치
 1) perl 5.8xx
  Apache2.0)
  ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl.ppd 실행

  Apache2.2)
  ppm install http://theoryx5.uwinnipeg.ca/ppms/mod_perl-2.0.ppd 실행

 

 2) perl 5.10xx
  Apache2.2
  ppm install http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd 실행


- apache 환경설정(httpd.conf)
 LoadModule cgi_module modules/mod_cgi.so

 <Directory "C:/apacheX.X/htdocs">
 Option 항목에 ExecCGI 추가
 </Directory>

 DirectoryIndex 에 index.pl 추가

 AddHandler cgi-script .cgi .pl 설정

 

- 테스트

#!c:/perl/bin/perl

print "Content-type: text/html\n\n";
print "Hello World\n";

댓글 없음:

댓글 쓰기