13 or so Steps to a Successful Installation

Before you can begin...


1. Make sure you have Perl installed. Type "perl -v" and see what comes back. You'll need release 5.004 or later. If mssing, or if you need to upgrade, go to O'Reilly's Perl site for the latest, greatest version.. You'll need the CGI module as well (if you want to do web-based uploading). The CGI module is now part of the standard PERL distribution

2. Install MySQL and the PERL->MySQL modules. You can get the MySQL distribution (we have used 3.21.x and later versions, at this writing we're running OSCR on the 3.22.32 release) from a number of mirror sites. The Perl modules ship with MySQL. We have just begun converting our software to use the DBI interface (see the /DBI sub-directory in the software distribution). You may mix in the DBI versions if you have the DBI interface installed on your server.

A few web-based tutorials I've found useful:

How to install the Perl module DBI on Linux[7/00]. [Locally cached copy]

MySQL/PERL/DBI with Linux

Setting up a MySQL based web site


3. Make sure you have Apache or some other reliable web server running on your system. The OSCR data entry and search modules run as cgi processes. With Release 1.30 we've begun to introduce PHP3 modules into the system. We *highly* recommend that you investigate building a copy of Apache with the PHP processor compiled in as an Apache module--it eliminates the CGI overhead.

How to install PHP/MySQL/Apache on Linux.

Once all that's in place, you need to...
1. Create a new MySQL database called "ers." You may use another name but you'll have to be sure to correctly code both OSCRinclude.pl with the new name and modify the first line in the text file "makeOCSRdatabase" where the "use ers;" occurs. Use the mysql program "mysqladmin" to create the new database.

# ./mysqladmin create ers {return}

Database "ers" created.
2. Build the OSCR database structure. The simple method is to issue this command as root:

# mysql < MakeOSCRdatabase {return}

This builds the database structure by issuing the MySQL commands found in the text file MakeOSCRdatabase.
3. Set MySQL permissions.If you already have MySQL configured for Web usage, justmake sure you have entries that allow the web server CGI process (which typically runs as nobody) to have access to your system and the database.

4. Set up the OSCR (CGI) directory. There are many ways to handle this.

We create a directory under our CGI-BIN directory and put all OSCR files there (e.g., /opt/www-ctl/cgi-bin/ers). You can use some other area on your system as long as you instruct your web server to run CGI processes from that directory.

You can set permissions for all *.cgi and *.pl files to 755. Make sure you make the file "article_id" writeable by the user your web server will be (e.g., "nobody"). This file contains the last article_id assigned and is used to make sure that there are no duplicates (each time you add an article or course to the system, the data entry cgi process opens this file, increments the number and closes it.

Note: If /opt/bin/perl isn't where you keep perl, then modify the programs (or create a symbolic link!)

As of release 1.80, here are the files you see in your CGI directory:

OSCRupload.cgi OSCRcrypt.pl OSCRinclude.pl
OSCRaddarticle.cgi OSCRcheckit.cgi OSCRchooseNewcourse.cgi
OSCRchoosecourse.cgi OSCRgencheckit.cgi OSCRgendataentry.cgi
OSCRgendataentryhome.cgi OSCRgen.cgi OSCRinstructorpopup.cgi
OSCRlist.cgi OSCRlistarticles.cgi OSCRpasswords.db
OSCRnewaddentrystart.cgi OSCRphp3.inc OSCRsearch.cgi
OSCRvalidateinstructor.cgi OSCRchoosetermedit.cgi OSCRchoosecourseedit.cgi
OSCReditarticle.cgi OSCReditcourse.cgi OSCRdel.cgi
OSCRcopyarticle.cgi OSCRchoosearticle.cgi OSCRcopycourse.cgi
OSCRgen.pl OSCRchoosetermpdfstats.cgi OSCRedit.cgi
OSCReditOSCR.cgi OSCRinput.cgi OSCRlistnew.cgi
OSCRliststats.cgi OSCRpdfstatdrilldown.cgi OSCRproflist.cgi
OSCRrequestpdf.cgi OSCRshowpdfstats.cgi OSCRstatistics.cgi
OSCRstatpopup.cgi OSCRstats.php3 OSCRvarinclude.pl


5. Open the file OSCRinclude.pl and modify the code to reflect your local institution. Most entries have a bit of documentation to assist you. We've tried to pull all system-level variables together in this file. If you want to have uploading via the web, you'll have to set a variable inside OSCRinclude.pl and then build your OSCRpasswords.db database. That file should reside in your cgi-bin directory. It is an ascii file, one entry per line. Each entry is username:encryptedpassword:/uploadpath. Use OSCRcrypt.pl to generate an encrypted password.
6. In step 5, you put in a value for the $URLToSearchPage (e.g., $URLToSearchPage = "http://ers2000.gmu.edu/cgi-bin/ers/OSCRgen.cgi";). If you think your server can't handle generating the search page on the fly (and most machines seem to have no trouble doing this), then you can hard code a static page in this value and create the page using OSCRgen.pl instead. If using PHP, you can have a search page built on demand by a script we've included (OSCRsrchform.php3).
7. Decide where you want to place the data entry portion of the system (e.g., we create a directory off our web servers document root named ers2000).
8. Move home.html to your data entry directory. CD to that directory and create a symbolic link between home.html and index.html (e.g., ln -s home.html index.html {return}).
9. You are now ready to do some data entry. Point your web browser to the URL mentioned in step 7 and select the Add an article option.

OSCR home