Page 248 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 248
Unit 14: Application Development and Administration
Notes
Notes Windows and UNIX users, you might want to add the Perl executable to your path,
but it is not necessary for this tutorial. In case, you want to add it to your path, here is an
example of the line I use in my autoexec.bat file. In UNIX you would typically define the
PATH in .login, though it is better to install Perl in a standard directory that is already
defined in your PATH such as “/usr/local/bin”.
Okay, once Perl is installed, try running a simple Perl program to make sure everything is
hunky dory. Here is the program I use:
#!c:\Perl\Perl5.00402\bin\perl.exe
print “hello world”;
Installing a Web Server: Sambar
Now that you have Perl installed and running, it is time to download a Web Server that you can
use locally to test CGI scripts.
But how can I run a web server on my computer that is not hooked up to the web?
Well, you “can” run a web server locally, but it will only be useful for testing and development.
That is, you will create a network composed of one computer and then use your web browser to
access the web server!
You can easily pick up a free web server for any operating system you are using. For UNIX and
Windows I recommend Apache. You can also use the Sambar Web Server for Windows. In the
case of this tutorial, I downloaded Sambar from www.sambar.com because it is so incredibly
easy to install. However, which Web Server you choose will not make a difference for this
tutorial. They will all work like Sambar for our purposes.
Once you download the self-extracting executable file from www.sambar.com, you run the
setup program and the server is installed. There is not much else to it. The server is fairly
featureless, but for testing purposes that can be just what the doctor ordered.
Once that is done, try running Sambar! You should see the status window. Once that is done, you
can try connecting to your personal web server. Just use your IP address in the location field in
LOVELY PROFESSIONAL UNIVERSITY 241