setup Perl&Apache on windows xp
Download
Download the All-in-One package at:
This package contains Perl and Apache binaries. so you don't need to download Apache additionally.
The downloaded file name is Perl-5.8-win32-bin-0.10.exe
Installation & configuration
Run this installation file, choose a directory where would be installed, if you want the files to be in C:\Perl\, just Enter C:\ . I installed at D:\Green\
All files would be copied into D:\Green\Perl and D:\Green\Apache2
After the installation, the application will ask you if start to configure the Apache and Perl. just need to follow the indication of the text based configuration wizard.
If configure is succeed with no error then go to next step.
Add these 2 paths where are your Perl and Apache installed into your OS environment variable PATH:
D:\Green\Perl\bin
D:\Green\Apache2\bin
Then open a dos window to run following commands:
dos> apache -k install
dos> apache -k start
- The 1st command will add a service in windows services list called Apache2.
- The 2nd command will start the Apache web server with default settings.
After this, you can open IE to visit your web server by either of below URLs. you should see the Apache welcome page if you generated them during the configuration above.
Following step is very important and must be taken! For running perl script named as .cgi or .pl on Apache, you should have below code at the first line in your each .pl or .cgi file:
#!d:/green/perl/bin/perl -w
Up to now, the Apache and Perl environment have been ready for use. visit these links for checking if Perl and PHP both work.
Reference
- http://wiki.perlchina.org/main/show/mod_perl%E4%BB%8B%E7%BB%8D
- http://www.antonioz.com/2005/11/15/apache%E4%B8%AD%E9%85%8D%E7%BD%AEperl/


