I extracted this part from my previous article MovableType Successfully Installed on Windows XP. From my log file, I found lots of my visitors came to my site with search keyword “Install Pearl on Windows XP“.
Install Perl on Windows XP
- Download ActivePerl for Windows XP from ActiveState. At the time I downloaed, the version was ActivePerl 5.6.1 build 633.
- After registering my user information, I choosed WIndows MSI package, which is 8.31M in size.
- It took me about 2 minutes and 51 seconds to download – thanks to the broadband provider – China Great Wall Broadband Corp[Chinese site]. I haven’t dreamed of downloading files larger than 5M in 10 minutes before.
- Install the MSI package. There is no any problem during the installation. I accepted all the defaul settings expect changing the default location from c:\Perl to c:\Program Files\Perl. I believe it is always good to follow the Windows convension instead of seeking for a place in root directory of C:\. This makes the disk hard to manage. Update: I am changing my mind recently. “C:\Program Files” folder is special in terms of Read-only settings and security permissions. Moving programs from their original location to this folder may bring unneccessary trouble if the program has never been tested in this environment.
Configure IIS for Perl and perl script with .CGI extension to work
- I know it is wired for more green hand to have CGI run on Windows computer. At this time, if anyone access http://home.wangjianshuo.com/mt/mt.cgi, it will prompt to download the file instead of see the result. I configured IIS to recognize .CGI extension just as it recognize .ASP or .SHTML.
- In Inetmgr.exe, right click MT folder and select Properties. Click Create button in Application Settings area on Directory tab. Click OK to close the dialog box. Now we have created a seperate application.
- Right click on Web Site node in Inetmgr.exe (the parent note of Default Web Site).
- Click Add and enter the same parsing program (C:\program files\perl\bin\perl.exe “%s” %s for my case) and enter .cgi to Extension text box. Click OK. Note: The above changes can ONLY be changed on website level, not on applicaiton level, otherwise, the OK button will always be gray in the “Add/Edit Application Mapping” dialog box.
- Click Configure and check the program to parse .pl files. It is C:\program files\perl\bin\perl.exe “%s” %s for my server.