Setup Instructions for the Classroom System Administrator

Contents
  1. The Big Picture
  2. Which Database?
  3. Utility Programs to Install
  4. Installing Perl
  5. Installing the DBI and DBD Modules (WIN32)
  6. Installing the DBI and DBD Modules (UNIX)
  7. Installing a Web Server
  8. Installing the Database and Class Labs Source Files
  9. Making Sure Everything Works

  1. The Big Picture
  2. This course (Using Databases on the Web) can be adapted for a variety of classroom hardware configurations:

    A variety of classroom software configurations are possible:

    The required software includes:

    In addition, there is software that is recommended but not required:

    In its present form, this course assumes each student has a PC running Windows NT and equipped with a Perl interpreter, ODBC, Microsoft Access, a web server, and the Perl modules DBI and DBD::ODBC.

  3. Which Database?
  4. Perhaps the most important message of this course is that the technologies presented here make the choice of database -- traditionally a major, irrevocable decision -- less critical. These technologies are database- and platform-independent.

    The current version of this course assumes you're using Microsoft Access. The course can be adapted for:

  5. Utility Programs to Install
    1. Archive/Zipfile Unpacker
    2. Text Editor
    3. Perl error messages include source code line numbers, so the ability to locate lines in source code files by line number is essential for debugging. Make sure you have an editor that shows line numbers.

    4. File Manager
    5. NT Explorer is useful for many of the procedures described here. An easy way to invoke it is: Right-click on the Start button and choose Explore in the menu that pops up.

  6. Installing Perl
    1. Installing Perl on Windows NT
      1. Download the latest binary build of Perl from ActiveState to Temp folder
      2. Double click downloaded .exe file to execute self extracting setup file
      3. The Welcome Screen is displayed: Choose Next
      4. Software License Agreement: Choose Yes
      5. Installation Notes: Choose Yes
      6. Choose Destination Location: Choose Yes (C:\Perl)
      7. Select Components: Choose
        • Perl
        • Online Help and Documentation
        • Choose Next
      8. Select Perl Options:
        • Add the Perl bin directory to your path
        • Associate '.pl' with Perl.exe in Explorer
        • Choose Next
      9. Select Program Folder:
        • Program Folders: ActivePerl
        • Choose Next
      10. Start Copying Files: Choose Next
      11. Wait (5 to 10 minutes for processing)
      12. Do you want to review the release notes: Choose No
      13. Setup Complete: Choose Yes and click Finish (reboot)
      14. Verify a complete installation after reboot:
        • Open a dos window
        • Enter the command: perl -v
      TOTAL TIME FOR INSTALLATION: 12 to 15 minutes.

    2. Installing Perl on Unix

  7. Installing the DBI and DBD Modules on Win32
    1. Installing the DBI Module on WIN32
    2. ActivePerl comes with a built in package management system. It automatically retrieves packages from the repository and installs the modules you request. To activate the package management system:

      1. Open a dos window
      2. CD to the \perl\bin directory
      3. Enter the command: perl ppm.pl
      4. Notice the new command prompt: PPM>
      5. Enter the command: install DBI
      6. Install package 'DBI?' (y/N): y
      7. Wait for download and auto install to finish
      8. Enter command: quit

      TOTAL TIME FOR INSTALLATION: Less than 5 minutes.

    3. Installing the DBD Module
    4. You must have the appropriate DBD module for the database you're using. DBD modules are available for these databases:
      • Altera
      • CSV
      • DB2
      • Empress
      • FreeTDS
      • SearchServer
      • Informix
      • Informix4
      • Ingres
      • ODBC
      • Oracle
      • QBase
      • Solid
      • Sybase
      • XBase
      • mSQL
      • mysql
      • pNET
      The current version of the course demands DBD::ODBC which talks to Microsoft Access. For details, see the FAQ.

      To install the appropriate DBD module, use the same procedure as for DBI, except the install command should be: install DBD-ODBC (substitute the module name as appropriate)

  8. Installing the DBI and DBD Modules on Unix
    1. Installing the DBI Module
    2. Installing the DBD Module
    3. You may need to compile this module yourself. If so, get the source code from http://www.perl.com/CPAN/modules/by-module/DBD/ and compile as above.

  9. Installing a Web Server
  10. Many are available, including Microsoft's IIS, O'Reilly's Website, Netscape's FastTrack, and others. Some offer free or demo downloads from the Web.

    1. Installing the Netscape Fast Track Server on Windows NT
    2. Defining the .cgi Filename Extension (Windows NT)

  11. Installing the Database and Class Labs Source Files
    1. Building the Database
    2. For MySQL, Oracle, and Informix, build the test_nile database. Here are scripts that do this: For Microsoft Access, download a copy of a pre-built database: Here are scripts that verify that the tables are healthy:

    3. Connecting the Access database to ODBC (on NT)
    4. Installing the Class Labs Files on Windows NT
    5. Tips and Traps

  12. Making Sure Everything Works
  13. In your browser, run http://localhost/cgi-bin/dbweb-cgi/test.cgi. If you're using ODBC, also run http://localhost/cgi-bin/dbweb-cgi/testodbc.cgi. These work only if all the following criteria are satisfied (i.e. everything is installed and working): If clicking the above hyperlink yields a list of fictitious technical books, you're golden!

Copyright © 2006

Dan Keller Technical Services
4500 19th St., San Francisco
California, USA 94114
tel: 415 / 861-4500