BatchKi Reference Manual
next up previous contents index home

Subsections


Installing Prerequisites

Install Perl on Microsoft Windows

On the Unix/Linux platform, a Perl interpreter is usually already installed as part of the operating system. Microsoft Windows is not distributed with an included Perl interpreter. The following are instructions for downloading and installing Perl for 32-bit Microsoft Windows.

Download Active Perl

A bare bones Perl interpreter (sufficent for running BatchKi) is available for the Microsoft Operating system free of charge from ActiveState.COM. The following instructions were tested in March, 2007. By the time you are reading this, it is possible that the layout of downloadable files on the ActiveState.COM website might have changed.

  1. Point your browser to http://www.activestate.com/
  2. Select Downloads - All Downloads
  3. Select Language Distributions - Active Perl
  4. Select Get ActivePerl - Free Download
  5. Select Windows (x86) - MSI Package2.2

Install Active Perl

The distributed Active Perl MSI package is a self contained installation archive. In the following we assume that the Perl interpreter is being installed into the directory Perl on the logical drive F:.

  1. Start the Perl installation program (file ActivePerl-...-VERSION.msi).
  2. Select the installation directory (e.g. F:/Perl)
  3. Choose all default options (e.g., ``Create Perl file extension association'', etc.)
  4. Wait for the installation to be completed, including the autogenerated HTML documentation.

\includegraphics[scale=0.40]{eps/install/perl-001.eps} \includegraphics[scale=0.40]{eps/install/perl-002.eps}

Verify Active Perl installation

Start the Windows command-line interpreter (``Command Prompt'') and type perl -v. The Perl interpreter should announce itself by displaying the following banner:


C:\>perl -v

This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 50 registered patches, see perl -V for more detail)

Copyright 1987-2006, Larry Wall

...

C:\>

Install Apache Web Server on MS Windows

On the Unix/Linux platform, the Apache HTTP server is usually already pre-installed. The following are instructions for downloading and installing Apache for 32-bit Microsoft Windows.

Download Apache HTTP server

The following instructions were tested in March, 2007. By the time you are reading this, it is possible that the layout of downloadable files on the Apache.ORG website might have changed.

IMPORTANT NOTE: Only version 2.0.x of the Apache HTTP server has been thoroughly tested with BatchKi for Windows. We have encountered problems with installing the newer version 2.2.x of the Apache server (depending on which version of the Microsoft Windows operating system was involved). Therefore, we recommend downloading and installing Apache HTTP server 2.0.x.

  1. Point your browser to http://www.apache.org/
  2. Select HTTP Server
  3. Under ``Mirror'', select Download - From a Mirror2.3
  4. Select a suitable mirror server from the drop down menu
  5. Under ``Apache HTTP Server 2.0.x is also available'', click Win32 Binary (MSI Installer), file apache_2.0..-no_ssl.msi.

Install Apache HTTP server

Before installing Apache web server under Microsoft Windows, it is necessary to (ast least temporarily) shut down any other services listening on port number 80, such as the Microsoft Internet Information Server (IIS). To determine whether or not the IIS is already running, point your web browser to http://localhost/. If any web page is in fact served, shut down the IIS from within the Windows control panel.

  1. Start - Settings - Control Panel
  2. Administrative Tools - Services
  3. IIS Admin Service

\includegraphics[scale=0.33]{eps/install/win2k-services-002.eps} \includegraphics[scale=0.33]{eps/install/win2k-services-003.eps}

The distributed Apache HTTP Server MSI package is a self contained installation archive. In the following, we assume that the server is being installed into the directory Apache/Apache2 on the logical drive J:. We also assume that the that (for the purpose of this demonstration) the Apache web server is being installed on a computer with the I.P. address 192.168.0.106, assigned by the local DHCP server.

  1. Start the Apache server installation program (file apache_..._no_ssl.msi).
  2. Select ``Custom Installation''
  3. Choose the appropriate domain name or I.P. address for your server.
  4. Select the installation directory (e.g. J:/Apache/Apache2)
  5. Wait for the installation to be completed.

\includegraphics[scale=0.40]{eps/install/apache-001.eps} \includegraphics[scale=0.40]{eps/install/apache-002.eps}

Verify Apache HTTP server installation

Point your web browser either to http://localhost/ or to the assigned IP address (in this example, http://192.168.0.106/). The server should display the following default page:

\includegraphics[scale=0.50]{eps/install/apache-005.eps}

Locate a sample CGI Perl script called printenv.pl. Assuming that the target directory chosen during the installation was J:/Apache, the directory in which the CGI script is located is J:/Apache/Apache2/cgi-bin/. As distributed, the listing of the test CGI script is as follows:

#!d:/Perl/bin/perl.exe
##
##  printenv -- demo CGI program which just prints its environment
##

print "Content-type: text/plain; charset=iso-8859-1\n\n";
foreach $var (sort(keys(%ENV))) {
    $val = $ENV{$var};
    $val =~ s|\n|\\n|g;
    $val =~ s|"|\\"|g;
    print "${var}=\"${val}\"\n";
}

Note that the presumed path to the Perl interpreter is d:/Perl/bin/perl.exe, but our actual path to Perl (in this example) is F:/Perl/bin/perl.exe (logical drive F instead of D). Therefore, we will edit the line

#!d:/Perl/bin/perl.exe

and replace it with

#!F:/Perl/bin/perl.exe

Now point your web browser to http://192.168.0.106/cgi-bin/printenv.pl. The web server should display the environmental variables existing on it:

\includegraphics[scale=0.40]{eps/install/apache-007.eps}

This completes the verification of both the Perl interpreter and the Apache web server being installed.


next up previous contents index home
biokin.com/batchki/manual/reference/html/node8.html
Petr Kuzmic | Jul 12 2008