Index: openacs-4/packages/acs-core-docs/www/acs-admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-admin.html,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 5 May 2004 12:36:02 -0000 1.30 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 11 Jun 2004 10:17:35 -0000 1.31 @@ -1 +1 @@ -Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 4
Install OpenACS 5.2.0d1
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
How Do I?
5. Upgrading
Overview
Upgrading 4.5 or higher to 4.6.3
Upgrading OpenACS 4.6.3 to 5.0
Upgrading 5.0.0 to 5.0.x
Upgrading the OpenACS files
Upgrading Platform components
6. Production Environments
Starting and Stopping an OpenACS instance.
AOLserver keepalive with inittab
Running multiple services on one machine
High Availability/High Performance Configurations
Staged Deployment for Production Networks
Installing SSL Support for an OpenACS service
Set up Log Analysis Reports
External uptime validation
Diagnosing Performance Problems
7. Database Management
Running a PostgreSQL database on another server
Deleting a tablespace
Vacuum Postgres nightly
8. Backup and Recovery
Backup Strategy
Manual backup and recovery
Automated Backup
Using CVS for backup-recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
Install AOLserver 3.3oacs1
A. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
+Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 4
Install OpenACS 5.2.0d1
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
How Do I?
5. Upgrading
Overview
Upgrading 4.5 or higher to 4.6.3
Upgrading OpenACS 4.6.3 to 5.0
Upgrading 5.0.0 to 5.0.x
Upgrading the OpenACS files
Upgrading Platform components
6. Production Environments
Starting and Stopping an OpenACS instance.
AOLserver keepalive with inittab
Running multiple services on one machine
High Availability/High Performance Configurations
Staged Deployment for Production Networks
Installing SSL Support for an OpenACS service
Set up Log Analysis Reports
External uptime validation
Diagnosing Performance Problems
7. Database Management
Running a PostgreSQL database on another server
Deleting a tablespace
Vacuum Postgres nightly
8. Backup and Recovery
Backup Strategy
Manual backup and recovery
Automated Backup
Using CVS for backup-recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
Install AOLserver 3.3oacs1
A. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-package-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-package-dev.html,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/acs-package-dev.html 5 May 2004 12:36:03 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/acs-package-dev.html 11 Jun 2004 10:17:35 -0000 1.19 @@ -1,2 +1,2 @@ -Part�III.�For OpenACS Package Developers

For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. -

View comments on this page at openacs.org
+Part�III.�For OpenACS Package Developers

For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. +

View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-plat-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-plat-dev.html,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 5 May 2004 12:36:03 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 11 Jun 2004 10:17:35 -0000 1.20 @@ -1 +1 @@ -Part�IV.�For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

15. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Security Requirements
Security Design
Security Notes
Request Processor Requirements
Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
16. Releasing OpenACS
OpenACS Core and .LRN
How to Update the OpenACS.org repository
How to package and release an OpenACS Package
How to Update the translations
View comments on this page at openacs.org
+Part�IV.�For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

15. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Security Requirements
Security Design
Security Notes
Request Processor Requirements
Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
16. Releasing OpenACS
OpenACS Core and .LRN
How to Update the OpenACS.org repository
How to package and release an OpenACS Package
How to Update the translations
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/analog-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/analog-install.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/analog-install.html 5 May 2004 12:36:03 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/analog-install.html 11 Jun 2004 10:17:36 -0000 1.13 @@ -1,4 +1,4 @@ -Install Analog web file analyzer

Install Analog web file analyzer

Download the Analog source tarball in +Install Analog web file analyzer

Install Analog web file analyzer

Download the Analog source tarball in /tmp. Unpack, compile, and install analog.

[root aolserver]# cd /usr/local/src
 [root src]# tar xzf /tmp/analog-5.32.tar.gz
 [root src]# cd analog-5.32
Index: openacs-4/packages/acs-core-docs/www/analog-setup.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/analog-setup.html,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-core-docs/www/analog-setup.html	5 May 2004 12:36:03 -0000	1.4
+++ openacs-4/packages/acs-core-docs/www/analog-setup.html	11 Jun 2004 10:17:36 -0000	1.5
@@ -1,32 +1,32 @@
-Set up Log Analysis Reports

Set up Log Analysis Reports

Analog is a program with processes webserver access logs, +Set up Log Analysis Reports

Set up Log Analysis Reports

Analog is a program with processes webserver access logs, performs DNS lookup, and outputs HTML reports. Analog should already be installed. A modified configuration file is included in - the OpenACS tarball.

  1. [root src]# su - service0
    -[service0 service0]$ cd /var/lib/aolserver/service0
    -[service0 service0]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
    -[service0 service0]$ mkdir www/log
    -[service0 service0]$ cp -r /usr/share/analog-5.31/images www/log/
    -[service0 service0]$ 
    -su - service0
    -cd /var/lib/aolserver/service0
    -cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
    +      the OpenACS tarball.

    1. [root src]# su - $OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ mkdir www/log
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cp -r /usr/share/analog-5.31/images www/log/
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ 
      +su - $OPENACS_SERVICE_NAME
      +cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
       mkdir www/log
       cp -r /usr/share/analog-5.31/images www/log/

      Edit -/var/lib/aolserver/service0/etc/analog.cfg and change the variable in HOSTNAME "[my +/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/analog.cfg and change the variable in HOSTNAME "[my organisation]" to reflect your website title. If you don't want the traffic log to be publicly visible, change -OUTFILE /var/lib/aolserver/service0/www/log/traffic.html to use a private -directory.

    2. Run it.

      [service0 service0]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
      +OUTFILE /var/lib/aolserver/$OPENACS_SERVICE_NAME/www/log/traffic.html to use a private
      +directory.

    3. Run it.

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/analog.cfg
       /usr/share/analog-5.31/analog: analog version 5.31/Unix
       /usr/share/analog-5.31/analog: Warning F: Failed to open DNS input file
      -  /home/service0/dnscache: ignoring it
      +  /home/$OPENACS_SERVICE_NAME/dnscache: ignoring it
         (For help on all errors and warnings, see docs/errors.html)
       /usr/share/analog-5.31/analog: Warning R: Turning off empty Search Word Report
      -[service0 service0]$

      Verify that it works by browing to http://yourserver.test:8000/log/traffic.html

    4. Automate this by creating a file in - /etc/cron.daily.

      [service0 service0]$ exit
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$

      Verify that it works by browing to http://yourserver.test:8000/log/traffic.html

    5. Automate this by creating a file in + /etc/cron.daily.

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
       logout
       
       [root root]# emacs /etc/cron.daily/analog

      Put this into the file:

      #!/bin/sh
       
      -/usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
      [root root]# chmod 755 /etc/cron.daily/analog

      Test it by running the script.

      [root root]# sh /etc/cron.daily/analog

      Browse to http://yourserver.test/log/traffic.html

View comments on this page at openacs.org
+/usr/share/analog-5.31/analog -G -g/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/analog.cfg
[root root]# chmod 755 /etc/cron.daily/analog

Test it by running the script.

[root root]# sh /etc/cron.daily/analog

Browse to http://yourserver.test/log/traffic.html

View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver.html,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-core-docs/www/aolserver.html 5 May 2004 12:36:03 -0000 1.36 +++ openacs-4/packages/acs-core-docs/www/aolserver.html 11 Jun 2004 10:17:36 -0000 1.37 @@ -1,4 +1,4 @@ -Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup

+Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

We recommend the use of AOLserver 4.0.1 or later. These instructions are retained as a resource.

Index: openacs-4/packages/acs-core-docs/www/aolserver4.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver4.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/aolserver4.html 5 May 2004 12:36:03 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/aolserver4.html 11 Jun 2004 10:17:37 -0000 1.13 @@ -1,4 +1,4 @@ -Install AOLserver 4

Install AOLserver 4

by Malte Sussdorff

+Install AOLserver 4

Install AOLserver 4

by Malte Sussdorff

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
  1. Retrieve TCL 8.4 (or higher).�Download and install TCL 8.4

    If you have not installed TCL already, download the latest TCL version from Sourceforge

    Remember that you have to be root if you want to follow these instructions. On Mac OS X type sudo su - to become root.

    Alternatively use curl -L -O instead of wget (especially on Mac OS X.

    [root root]# cd /usr/local/src
    @@ -59,7 +59,7 @@
     // typedef unsigned char u_int8_t;

    Now install nssha1:

    [root nssha1]# make install
  2. Install tDOM

    [root nssha1]# cd ../tDOM-0.7.8/unix

    Edit the CONFIG file. Uncomment the instructions meant for AOLserver 4, but edit it to look like this:

    ../configure --enable-threads --disable-tdomalloc
               --prefix=/usr/local/aolserver40r2 --with-tcl=/usr/local/lib

    Now you can compile and configure tDOM

    [root unix]# sh CONFIG
     [root unix]# make install

-

  • Add a database-specific wrapper script.�This script +

  • Add a database-specific wrapper script.�This script sets database environment variables before starting AOLserver; this allows the AOLserver instance can communicate with the database. There is one script each for @@ -77,4 +77,4 @@ cd /usr/local/aolserver40r2/bin cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres chmod 755 nsd-postgres

  • You may need to edit these scripts if you are not using - /usr/local/aolserver as the directory of Aolserver4.

  • Change startup script (optional).�If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

  • Test AOLserver.

  • ($Id$)
    View comments on this page at openacs.org
    + /usr/local/aolserver as the directory of Aolserver4.

  • Change startup script (optional).�If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

  • Test AOLserver.

  • ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/apm-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-design.html,v diff -u -r1.28 -r1.29 --- openacs-4/packages/acs-core-docs/www/apm-design.html 5 May 2004 12:36:03 -0000 1.28 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 11 Jun 2004 10:17:37 -0000 1.29 @@ -1,4 +1,4 @@ -Package Manager Design

    Package Manager Design

    By Bryan Quinn

    +Package Manager Design

    Package Manager Design

    By Bryan Quinn

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Essentials

    • OpenACS Administrator directory

    • Package Manager Requirements

    • Packages

    • ER diagram

    • Tcl API

      • Index: openacs-4/packages/acs-core-docs/www/apm-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-requirements.html,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/apm-requirements.html 5 May 2004 12:36:03 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/apm-requirements.html 11 Jun 2004 10:17:37 -0000 1.24 @@ -1,4 +1,4 @@ -Package Manager Requirements

        Package Manager Requirements

        By Bryan Quinn and Todd Nightingale

        +Package Manager Requirements

        Package Manager Requirements

        By Bryan Quinn and Todd Nightingale

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Introduction

        The following is a requirements document for the OpenACS Package Manager Index: openacs-4/packages/acs-core-docs/www/automated-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-backup.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/automated-backup.html 5 May 2004 12:36:03 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/automated-backup.html 11 Jun 2004 10:17:37 -0000 1.4 @@ -1,3 +1,3 @@ -Automated Backup

        Automated Backup

        The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/service0/database-backup and then backs up all of /var/lib/aolserver/service0 to a single zip file, and then copies that zip file to another computer.

        1. Make sure that the manual backup process described above works.

        2. Customize the default backup script. Edit /var/lib/aolserver/service0/etc/backup.sh with your specific parameters.

        3. +Automated Backup

          Automated Backup

          The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup and then backs up all of /var/lib/aolserver/$OPENACS_SERVICE_NAME to a single zip file, and then copies that zip file to another computer.

          1. Make sure that the manual backup process described above works.

          2. Customize the default backup script. Edit /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh with your specific parameters.

          3. Make sure the file is executable:

            chmod +x backup.sh
          4. - Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e.) This example runs the backup script at 1:30 am every day.

            30 1 * * * *        sh /var/lib/aolserver/service0/etc/backup.sh
          View comments on this page at openacs.org
          + Set this file to run automatically by adding a line to root's crontab. (Typically, with export EDITOR=emacs; crontab -e.) This example runs the backup script at 1:30 am every day.

          30 1 * * * *        sh /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/backup.sh
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 5 May 2004 12:36:03 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 11 Jun 2004 10:17:37 -0000 1.15 @@ -1,4 +1,4 @@ -Automated Testing

        Automated Testing

        By Jeff Davis

        +Automated Testing

        Automated Testing

        By Jeff Davis

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Best practices in writing OpenACS automated tests

        • Special characters in Tcl.� Index: openacs-4/packages/acs-core-docs/www/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 5 May 2004 12:36:03 -0000 1.29 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 11 Jun 2004 10:17:37 -0000 1.30 @@ -1,4 +1,4 @@ -Chapter�8.�Backup and Recovery

          Chapter�8.�Backup and Recovery

          By Don Baccus with additions +Chapter�8.�Backup and Recovery

          Chapter�8.�Backup and Recovery

          By Don Baccus with additions by Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -7,4 +7,4 @@ probably need to create your own backup strategies (in particular full dumps from oracle, while easy to set up, are far from the best solution).

          There are three basic things which need to be backed up, the database data, the server - source tree, and the acs-content-repository (which is in the server source tree).

          Figure�8.1.�Backup and Recovery Strategy

          Backup and Recovery Strategy
          ($Id$)
          View comments on this page at openacs.org
          + source tree, and the acs-content-repository (which is in the server source tree).

          Figure�8.1.�Backup and Recovery Strategy

          Backup and Recovery Strategy
          ($Id$)
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/backups-with-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backups-with-cvs.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/backups-with-cvs.html 5 May 2004 12:36:03 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/backups-with-cvs.html 11 Jun 2004 10:17:37 -0000 1.4 @@ -1,30 +1,30 @@ -Using CVS for backup-recovery

          Using CVS for backup-recovery

          CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't +Using CVS for backup-recovery

          Using CVS for backup-recovery

          CVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't need to do anything to back up your files. Just make sure that your current work is checked into the system. You can then roll back based on date - note the current system time, down to the minute. For maximum safety, you can apply a tag to your current - files. You will still need to back up your database.

          Note that, if you did the CVS options in this document, the /var/lib/aolserver/service0/etc directory is not included in cvs and you may want to add it.

          [root root]# su - service0
          -[service0 service0]$ cd /var/lib/aolserver/service0
          -[service0 service0]$ cvs commit -m "last-minute commits before upgrade to 4.6"
          +      files.  You will still need to back up your database.

          Note that, if you did the CVS options in this document, the /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc directory is not included in cvs and you may want to add it.

          [root root]# su - $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs commit -m "last-minute commits before upgrade to 4.6"
           cvs commit: Examining .
           cvs commit: Examining bin
           (many lines omitted)
          -[service0 service0]$ cvs tag before_upgrade_to_4_6
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs tag before_upgrade_to_4_6
           cvs server: Tagging bin
           T bin/acs-4-0-publish.sh
           T bin/ad-context-server.pl
           (many lines omitted)
          -[service0 service0]$ exit
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
           [root root]# 
          -su - service0
          -cd /var/lib/aolserver/service0
          +su - $OPENACS_SERVICE_NAME
          +cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
           cvs commit -m "last-minute commits before upgrade to 4.6"
           cvs tag before_upgrade_to_4_6
          -exit

          To restore files from a cvs tag such as the one used above:

          [root root]# su - service0
          -[service0 service0]$ cd /var/lib/aolserver/service0
          -[service0 service0]$ cvs up -r current
          -[service0 service0]$ exit
          -su - service0
          -cd /var/lib/aolserver/service0
          +exit

          To restore files from a cvs tag such as the one used above:

          [root root]# su - $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs up -r current
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
          +su - $OPENACS_SERVICE_NAME
          +cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
           cvs up -r current
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/bootstrap-acs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -Bootstrapping OpenACS

          Bootstrapping OpenACS

          By Jon Salz

          +Bootstrapping OpenACS

          Bootstrapping OpenACS

          By Jon Salz

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
          • Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl

          This document describes the startup (bootstrapping) process for an AOLserver Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ch08s06.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.10 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ch10s06.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/complete-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/complete-install.html,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-core-docs/www/complete-install.html 5 May 2004 12:36:03 -0000 1.13 +++ openacs-4/packages/acs-core-docs/www/complete-install.html 11 Jun 2004 10:17:37 -0000 1.14 @@ -1 +1 @@ -Chapter�3.�Complete Installation

          View comments on this page at openacs.org
          +Chapter�3.�Complete Installation
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/configuring-new-site.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-new-site.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/configuring-new-site.html 5 May 2004 12:36:03 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/configuring-new-site.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1,4 +1,4 @@ -Chapter�4.�Configuring a new OpenACS Site

          Chapter�4.�Configuring a new OpenACS Site

          Table of Contents

          How Do I?

          by Joel Aufrecht

          +Chapter�4.�Configuring a new OpenACS Site

          Chapter�4.�Configuring a new OpenACS Site

          Table of Contents

          How Do I?

          by Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          In this chapter, Configuring refers to making changes to a new OpenACS site through the web interface. In crude terms, these changes happen in the database, and are upgrade-safe. Customizing refers to changes that touch the file system, and require some planning if easy upgradability is to be maintained.

          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/credits.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/credits.html,v diff -u -r1.34 -r1.35 --- openacs-4/packages/acs-core-docs/www/credits.html 5 May 2004 12:36:03 -0000 1.34 +++ openacs-4/packages/acs-core-docs/www/credits.html 11 Jun 2004 10:17:37 -0000 1.35 @@ -1,4 +1,4 @@ -Appendix�C.�Credits

          Appendix�C.�Credits

          By Vinod Kurup

          +Appendix�C.�Credits

          Appendix�C.�Credits

          By Vinod Kurup

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          Vinod Kurup put Index: openacs-4/packages/acs-core-docs/www/cvs-tips.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-tips.html,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 5 May 2004 12:36:03 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 11 Jun 2004 10:17:37 -0000 1.20 @@ -1,62 +1,62 @@ -Appendix�D.�Using CVS with an OpenACS Site

          Appendix�D.�Using CVS with an OpenACS Site

          By Joel Aufrecht

          +Appendix�D.�Using CVS with an OpenACS Site

          Appendix�D.�Using CVS with an OpenACS Site

          By Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

          Add the Service to CVS - OPTIONAL.�These steps take an existing OpenACS directory and add +

          Add the Service to CVS - OPTIONAL.�These steps take an existing OpenACS directory and add it to a CVS - repository.

          1. Create and set permissions on a subdirectory in the local cvs repository.

            [root root]# mkdir /cvsroot/service0
            -[root root]# chown service0.service0 /cvsroot/service0
            +          repository.

            1. Create and set permissions on a subdirectory in the local cvs repository.

              [root root]# mkdir /cvsroot/$OPENACS_SERVICE_NAME
              +[root root]# chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
               [root root]#
              -mkdir /cvsroot/service0
              -chown service0.service0 /cvsroot/service0
            2. Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc.

              [root root]# su - service0
              -[service0 service0]$ emacs .bashrc

              Put this string into /home/service0/.bashrc:

              export CVSROOT=/cvsroot
              [service0 service0]$ exit
              +mkdir /cvsroot/$OPENACS_SERVICE_NAME
              +chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /cvsroot/$OPENACS_SERVICE_NAME
            3. Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc.

              [root root]# su - $OPENACS_SERVICE_NAME
              +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ emacs .bashrc

              Put this string into /home/$OPENACS_SERVICE_NAME/.bashrc:

              export CVSROOT=/cvsroot
              [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
               logout
               
               [root root]#
            4. Import all files into cvs. In order to work on files with source control, the files must be checked out from cvs. So we will import, move aside, and then check out all of the files. In the cvs import command, - service0 + $OPENACS_SERVICE_NAME refers to the cvs repository to use; it uses the CVSROOT plus this string, i.e. - /cvsroot/service0. + /cvsroot/$OPENACS_SERVICE_NAME. "OpenACS" is the vendor tag, and "HEAD" is the release tag. These tags will be useful in upgrading and - branching. -m sets the version comment.

              [root root]# su - service0
              -[service0 service0]$ cd /var/lib/aolserver/service0
              -[service0 service0]$ cvs import -m "initial install" service0 OpenACS HEAD
              -N service0/license.txt
              -N service0/readme.txt
              +            branching.  -m sets the version comment.

              [root root]# su - $OPENACS_SERVICE_NAME
              +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs import -m "initial install" $OPENACS_SERVICE_NAME OpenACS HEAD
              +N $OPENACS_SERVICE_NAME/license.txt
              +N $OPENACS_SERVICE_NAME/readme.txt
               (many lines omitted)
              -N service0/www/SYSTEM/flush-memoized-statement.tcl
              +N $OPENACS_SERVICE_NAME/www/SYSTEM/flush-memoized-statement.tcl
               
               No conflicts created by this import
               
              -[service0 service0]$ exit
              +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
               [root root]#
              -su - service0
              -cd /var/lib/aolserver/service0
              -cvs import -m "initial install" service0 OpenACS HEAD
              -exit

              Move the original directory to a temporary location, and check out the cvs repository in its place.

              [root root]# mv /var/lib/aolserver/service0 /var/tmp
              -[root root]# mkdir /var/lib/aolserver/service0
              -[root root]# chown service0.service0 /var/lib/aolserver/service0
              -[root root]# su - service0
              -[service0 service0]$ cd /var/lib/aolserver
              -[service0 aolserver]$ cvs checkout service0
              -cvs checkout: Updating service0
              -U service0/license.txt
              +su - $OPENACS_SERVICE_NAME
              +cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +cvs import -m "initial install" $OPENACS_SERVICE_NAME OpenACS HEAD
              +exit

              Move the original directory to a temporary location, and check out the cvs repository in its place.

              [root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME /var/tmp
              +[root root]# mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +[root root]# chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +[root root]# su - $OPENACS_SERVICE_NAME
              +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
              +[$OPENACS_SERVICE_NAME aolserver]$ cvs checkout $OPENACS_SERVICE_NAME
              +cvs checkout: Updating $OPENACS_SERVICE_NAME
              +U $OPENACS_SERVICE_NAME/license.txt
               (many lines omitted)
              -U service0/www/SYSTEM/dbtest.tcl
              -U service0/www/SYSTEM/flush-memoized-statement.tcl
              -[service0 aolserver]$ exit
              +U $OPENACS_SERVICE_NAME/www/SYSTEM/dbtest.tcl
              +U $OPENACS_SERVICE_NAME/www/SYSTEM/flush-memoized-statement.tcl
              +[$OPENACS_SERVICE_NAME aolserver]$ exit
               logout
               
               [root root]#
               
              -mv /var/lib/aolserver/service0 /var/tmp
              -mkdir /var/lib/aolserver/service0
              -chown service0.service0 /var/lib/aolserver/service0
              -su - service0
              +mv /var/lib/aolserver/$OPENACS_SERVICE_NAME /var/tmp
              +mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +chown $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME /var/lib/aolserver/$OPENACS_SERVICE_NAME
              +su - $OPENACS_SERVICE_NAME
               cd /var/lib/aolserver
              -cvs checkout service0
              +cvs checkout $OPENACS_SERVICE_NAME
               exit
            5. If the service starts correctly, come back and remove the temporary copy of the uploaded files.

          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/database-management.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/database-management.html,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/database-management.html 5 May 2004 12:36:03 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/database-management.html 11 Jun 2004 10:17:37 -0000 1.21 @@ -1,4 +1,4 @@ -Chapter�7.�Database Management

          Chapter�7.�Database Management

          By Joel Aufrecht

          +Chapter�7.�Database Management

          Chapter�7.�Database Management

          By Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/db-api-detailed.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api-detailed.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -Database Access API

          Database Access API

          By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

          +Database Access API

          Database Access API

          By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
          • Tcl procedures: /packages/acs-kernel/10-database-procs.tcl

          • Tcl initialization: /packages/acs-kernel/database-init.tcl

          The Big Picture

          Index: openacs-4/packages/acs-core-docs/www/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/db-api.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/db-api.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -The OpenACS Database Access API

          The OpenACS Database Access API

          +The OpenACS Database Access API

          The OpenACS Database Access API

          By Pete Su and Jon Salz. Modified by Roberto Mello.

          Overview

          One of OpenACS's great strengths is that code written for it is Index: openacs-4/packages/acs-core-docs/www/dev-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/dev-guide.html,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 5 May 2004 12:36:03 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 11 Jun 2004 10:17:37 -0000 1.25 @@ -1 +1 @@ -Chapter�11.�Development Reference

          View comments on this page at openacs.org
          +Chapter�11.�Development Reference
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/doc-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/doc-standards.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/doc-standards.html 5 May 2004 12:36:03 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/doc-standards.html 11 Jun 2004 10:17:37 -0000 1.7 @@ -1 +1 @@ -Chapter�13.�Documentation Standards
          View comments on this page at openacs.org
          +Chapter�13.�Documentation Standards
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/docbook-primer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/docbook-primer.html,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 5 May 2004 12:36:03 -0000 1.36 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 11 Jun 2004 10:17:37 -0000 1.37 @@ -1,4 +1,4 @@ -OpenACS Documentation Guide

          OpenACS Documentation Guide

          +OpenACS Documentation Guide

          OpenACS Documentation Guide

          By Claus Rasmussen, with additions by Roberto Mello and the OpenACS Community

          Overview of OpenACS Documentation

          @@ -36,7 +36,7 @@ In order to separate content and presentation, all OpenACS documentation will be marked up to conform to the DocBook XML DTD - + This enables us to publish in a variety of formats and relieves each contributor of the burden of presentation, freeing him to focus on content and sharing knowledge. @@ -57,7 +57,7 @@ list of elements and use more exotic features in your documents. The list is made up of SGML-elements but basically the same elements are valid in the XML DTD as long as you remember to: - +

          • Always close your tags with corresponding end-tags and to not use other tag minimization @@ -106,7 +106,7 @@ The documentation for each package will make up a little "book" that is structured like this - examples are emphasized: - +

                 book                        : Docs for one package - templating
            @@ -130,20 +130,20 @@
                   sources of these DocBook documents
                   to get an idea of how they are tied together.
                 

          Headlines, Sections

          - + Given that your job starts at the sect1-level, all your documents should open with a <sect1>-tag and end with the corresponding </sect1>.

          - + You need to feed every <sect1> two attributes. The first attribute, id, is standard and can be used with all elements. It comes in very handy when interlinking between documents (more about this when talking about links in the section called “Links”). The value of id has to be unique throughout the book you're making since the id's in your sect1's will turn into filenames when the book is parsed into HTML.

          - + The other attribute is xreflabel. The value of this is the text that will appear as the link when referring to this sect1.

          @@ -158,7 +158,7 @@ </sect1>

          - + Inside this container your document will be split up into <sect2>'s, each with the same requirements - id and xreflabel @@ -167,7 +167,7 @@ When it comes to naming your sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview.

          Code

          - + For displaying a snippet of code, a filename or anything else you just want to appear as a part of a sentence, we will use the tag <computeroutput>. @@ -177,12 +177,12 @@ <programlisting> is used. Just wrap your code block in it; mono-spacing, indents and all that stuff is taken care of automatically.

          Links

          - + Linking falls into two different categories: inside the book you're making and outside:

          1. Inside linking, cross-referencing other parts of your book

          By having unique id's you can cross-reference any part of your book with a simple tag, regardless of where that part is. -

          Check out how I link to a subsection of the Developer's Guide:

          Put this in your XML:

          +	  

          Check out how I link to a subsection of the Developer's Guide:

          Put this in your XML:

           - Find information about creating a package in
           <xref linkend="packages-making-a-package"></xref>.
           

          And the output is:

          @@ -206,7 +206,7 @@
           	    packages-looks, the
           	    parser will try its best to explain where the link takes you.
           	  

          2. Linking outside the documentation

          - + If you're hyper-linking out of the documentation, it works almost the same way as HTML - the tag is just a little different @@ -227,7 +227,7 @@ do it, so if you want to start converting your documents right away, start out with the ones without graphics ;)

          - + To insert a graphic we use the elements <mediaobject>, <imageobject>, @@ -253,7 +253,7 @@ Put your graphics in a separate directory ("images") and link to them only with relative paths.

          Lists

          - + Here's how you make the DocBook equivalent of the three usual HTML-lists:

          1. How to make an <ul>

          Making an unordered list is pretty much like doing the same thing in HTML - if you close your <li>, that is. The only differences are that each list item has to be wrapped in something more, such as @@ -298,7 +298,7 @@ </variablelist>

          Tables

          - + DocBook supports several types of tables, but in most cases, the <informaltable> is enough: @@ -335,7 +335,7 @@ <table> for an example.

          Emphasis

          - + Our documentation uses two flavors of emphasis - italics and bold type. DocBook uses one - <emphasis>.

          Index: openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html,v diff -u -r1.34 -r1.35 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 5 May 2004 12:36:03 -0000 1.34 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 11 Jun 2004 10:17:37 -0000 1.35 @@ -1,4 +1,4 @@ -Constraint naming standard

          Constraint naming standard

          By Michael Bryzek

          +Constraint naming standard

          Constraint naming standard

          By Michael Bryzek

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          The Big Picture

          Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.34 -r1.35 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 5 May 2004 12:36:03 -0000 1.34 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 11 Jun 2004 10:17:37 -0000 1.35 @@ -1,4 +1,4 @@ -ACS File Naming and Formatting Standards

          ACS File Naming and Formatting Standards

          By Michael Yoon and Aurelius Prochazka

          +ACS File Naming and Formatting Standards

          ACS File Naming and Formatting Standards

          By Michael Yoon and Aurelius Prochazka

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          Index: openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -PL/SQL Standards

          PL/SQL Standards

          +PL/SQL Standards

          PL/SQL Standards

          By Richard Li and Yon Feldman

          OpenACS docs are written by the named authors, and may be edited Index: openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -Release Version Numbering

          Release Version Numbering

          By Ron Henderson

          Revised by Joel Aufrecht

          +Release Version Numbering

          Release Version Numbering

          By Ron Henderson

          Revised by Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          Index: openacs-4/packages/acs-core-docs/www/eng-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards.html,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 5 May 2004 12:36:03 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 11 Jun 2004 10:17:37 -0000 1.21 @@ -1 +1 @@ -Chapter�12.�Engineering Standards

          View comments on this page at openacs.org
          +Chapter�12.�Engineering Standards
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html,v diff -u -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 5 May 2004 12:36:03 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 11 Jun 2004 10:17:37 -0000 1.25 @@ -1,4 +1,4 @@ -External Authentication Requirements

          External Authentication Requirements

          Vision

          People have plenty of usernames and passwords already, we +External Authentication Requirements

          External Authentication Requirements

          Vision

          People have plenty of usernames and passwords already, we don't want them to have yet another. We want people to be able to log in to OpenACS with the same password they use to log in to any other system.

          Besides, administrators have better things to do than create @@ -44,7 +44,7 @@ only one implementation of the authentication API, namly the one included in OpenACS Core.

        • Authentication Driver API: The service contract which authentication drivers implement.

        Conceptual Pictures

        Authentication:

        -

        Account Management (NO PICTURE YET)

        Batch Synchronization (NO PICTURE YET)

        Requirements

        New API

        FeatureStatusDescription
        EXT-AUTH-01AExtend Authentication/Acct Status API
        EXT-AUTH-03AAccount Creation API
        EXT-AUTH-05APassword Management API
        EXT-AUTH-30AAuthority Management API

        Login

        FeatureStatusDescription
        EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
        EXT-AUTH-38Aad_form complain feature
        EXT-AUTH-19ARewrite password recovery to use API
        EXT-AUTH-21ARewrite email verification with API
        EXT-AUTH-28AUsername is email switch

        Users will log in using a username, a authority, and a +

        Account Management (NO PICTURE YET)

        Batch Synchronization (NO PICTURE YET)

        Requirements

        New API

        FeatureStatusDescription
        EXT-AUTH-01AExtend Authentication/Acct Status API
        EXT-AUTH-03AAccount Creation API
        EXT-AUTH-05APassword Management API
        EXT-AUTH-30AAuthority Management API

        Login

        FeatureStatusDescription
        EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
        EXT-AUTH-38Aad_form complain feature
        EXT-AUTH-19ARewrite password recovery to use API
        EXT-AUTH-21ARewrite email verification with API
        EXT-AUTH-28AUsername is email switch

        Users will log in using a username, a authority, and a password. The authority is the source for user/password verification. OpenACS can be an authority itself.

        Each user in OpenACS will belong to exactly one authority, which can either be the "local" OpenACS users table, in which case the Index: openacs-4/packages/acs-core-docs/www/filename.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/filename.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/filename.html 5 May 2004 12:36:03 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/filename.html 11 Jun 2004 10:17:37 -0000 1.36 @@ -1,4 +1,4 @@ -Detailed Design Documentation Template

        Detailed Design Documentation Template

        By You

        Start Note

        +Detailed Design Documentation Template

        Detailed Design Documentation Template

        By You

        Start Note

        NOTE: Some of the sections of this template may not apply to your package, e.g. there may be no user-visible UI elements for a component of the OpenACS Core. Furthermore, it may be easier in some circumstances Index: openacs-4/packages/acs-core-docs/www/for-everyone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/for-everyone.html,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 5 May 2004 12:36:03 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 11 Jun 2004 10:17:37 -0000 1.18 @@ -1 +1 @@ -Part�I.�OpenACS For Everyone

        View comments on this page at openacs.org
        +Part�I.�OpenACS For Everyone
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/form-builder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/form-builder.html,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/form-builder.html 5 May 2004 12:36:03 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/form-builder.html 11 Jun 2004 10:17:37 -0000 1.15 @@ -1,4 +1,4 @@ -Using HTML Forms

        Using HTML Forms

        Overview

        Multi-part Elements

        Some elements have more than one choice, or can submit more than one value.

        SELECT elements

        1. Creating the form element.�Populate a list of lists with values for the option list.

          set foo_options [db_list_of_lists foo_option_list "
          +Using HTML Forms

          Using HTML Forms

          Overview

          Multi-part Elements

          Some elements have more than one choice, or can submit more than one value.

          SELECT elements

          1. Creating the form element.�Populate a list of lists with values for the option list.

            set foo_options [db_list_of_lists foo_option_list "
                 select foo,
                        foo_id
                   from foos
            @@ -9,6 +9,39 @@
                     {options $foo_options}
                 }

            This will result in a single name/value pair coming back in the submitted form. Handle this within the same ad_form structure, in the -new_data and -edit_data. In the example, it is available as $foo

          See also the W3C spec for "The SELECT, OPTGROUP, and OPTION elements". -

          Common Errors

          Here are some common errors and what to do when you - encounter them:

          Error when selecting values

          This generally happens when there is an error in your +

          Using refreshes to pull additional information from the + database

          A situation you may run into often is where you want to pull + in form items from a sub-category when the first category is + selected. Ad_form makes this fairly easy to do. In the definition + of your form element, include an html section

              {pm_task_id:integer(select),optional
          +        {label "Subject"}
          +        {options {$task_options}}
          +        {html {onChange "document.form_name.__refreshing_p.value='1';submit()"}}
          +        {value $pm_task_id}
          +    }
          +    

          What this will do is set the value for pm_task_id and all the + other form elements, and resubmit the form. If you then include a + block that extends the form, you'll have the opportunity to add in + subcategories: +

              if {[exists_and_not_null pm_task_id]} {
          +    db_1row get_task_values { }
          +    ad_form -extend -name form_name -form { ... }
          +    

          Note that you will get strange results when you try to set + the values for the form. You'll need to set them explicitly in an + -on_refresh section of your ad_form. In that section, you'll get + the values from the database, and set the values as so:

              db_1row get_task_values { }
          +    template::element set_value form_name estimated_hours_work $estimated_hours_work
          +    

          Troubleshooting

          A good way to troubleshoot when you're using ad_form is to + add the following code at the top of the .tcl page (thanks Jerry + Asher):

          +ns_log notice it's my page!
          +set mypage [ns_getform]
          +if {[string equal "" $mypage]} {
          +    ns_log notice no form was submitted on my page
          +} else {
          +    ns_log notice the following form was submitted on my page
          +    ns_set print $mypage
          +}
          +    

          Common Errors

          Here are some common errors and what to do when you + encounter them:

          Error when selecting values

          This generally happens when there is an error in your query.

          ($Id$)
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/general-documents.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/general-documents.html,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/general-documents.html 5 May 2004 12:36:03 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 11 Jun 2004 10:17:37 -0000 1.18 @@ -1 +1 @@ -Chapter�1.�High level information: What is OpenACS?

          Chapter�1.�High level information: What is OpenACS?

          View comments on this page at openacs.org
          +Chapter�1.�High level information: What is OpenACS?

          Chapter�1.�High level information: What is OpenACS?

          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/groups-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-design.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/groups-design.html 5 May 2004 12:36:03 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 11 Jun 2004 10:17:37 -0000 1.23 @@ -1,4 +1,4 @@ -Groups Design

          Groups Design

          By Rafael H. Schloming and Mark Thomas

          +Groups Design

          Groups Design

          By Rafael H. Schloming and Mark Thomas

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          Essentials

          • User directory

          • Sitewide administrator directory

          • Subsite administrator directory

          • TCL script directory

          • OpenACS 4 Groups Requirements

          • Data model

          • PL/SQL file

            • Index: openacs-4/packages/acs-core-docs/www/groups-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-requirements.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 5 May 2004 12:36:03 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 11 Jun 2004 10:17:37 -0000 1.23 @@ -1,4 +1,4 @@ -Groups Requirements

              Groups Requirements

              By Rafael H. Schloming, Mark Thomas

              +Groups Requirements

              Groups Requirements

              By Rafael H. Schloming, Mark Thomas

              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

              Introduction

              Almost all database-backed websites have users, and need to model the Index: openacs-4/packages/acs-core-docs/www/high-avail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/high-avail.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/high-avail.html 5 May 2004 12:36:03 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/high-avail.html 11 Jun 2004 10:17:37 -0000 1.10 @@ -1 +1 @@ -High Availability/High Performance Configurations

              High Availability/High Performance Configurations

              See also the section called “Running a PostgreSQL database on another server”.

              Figure�6.1.�Multiple-server configuration

              Multiple-server configuration
              View comments on this page at openacs.org
              +High Availability/High Performance Configurations

              High Availability/High Performance Configurations

              See also the section called “Running a PostgreSQL database on another server”.

              Figure�6.1.�Multiple-server configuration

              Multiple-server configuration
              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/how-do-I.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/how-do-I.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/how-do-I.html 5 May 2004 12:36:03 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/how-do-I.html 11 Jun 2004 10:17:37 -0000 1.13 @@ -1,8 +1,6 @@ -How Do I?

              How Do I?

              How do I edit the front page of a new site through a web interface?

              The easiest way is to install the Edit-This-Page package.

              1. Log in to the web site as an administrator.

              2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

              3. - Choose Edit This Page and install -
              4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

              How do I let anybody who registers post to a weblog?

              Go to /admin/permissions and grant Create to Registered Users

              How do I replace the front page of a new site with the front page of an application on that site

              Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

              1. On the front page, click the Admin button.

              2. On the administration page, click Parameters link.

              3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

              How do I put custom functionality on front page of a new site?

              Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/service0/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

              1. cp /var/lib/aolserver/service0/packages/acs-subsite/www/index* /var/lib/aolserver/service0/www
              2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

              How do I change the site-wide style?

              Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

              • +How Do I?

                How Do I?

                How do I edit the front page of a new site through a web interface?

                The easiest way is to install the Edit-This-Page package.

                1. Log in to the web site as an administrator.

                2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

                3. Choose Edit This Page and install

                4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

                How do I let anybody who registers post to a weblog?

                Go to /admin/permissions and grant Create to Registered Users

                How do I replace the front page of a new site with the front page of an application on that site

                Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

                1. On the front page, click the Admin button.

                2. On the administration page, click Parameters link.

                3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

                How do I put custom functionality on front page of a new site?

                Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/$OPENACS_SERVICE_NAME/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

                1. cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-subsite/www/index* /var/lib/aolserver/$OPENACS_SERVICE_NAME/www
                2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

                How do I change the site-wide style?

                Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

                • A templated page uses an ADP/TCL pair. The first line in the ADP file is usually: -

                  <master>

                  If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/service0/www, this is /var/lib/aolserver/service0/www/default-master.adp and the associated .tcl file. -

                • The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/service0/www/site-master.adp and .tcl)

                • The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/service0/www/blank-master.adp and .tcl).

                • Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

                Figure�4.1.�Site Templates

                Site Templates

                How do I diagnose a permissions problem?

                • Steps to Reproduce.�The events package does not allow users to register for new events.

                  1. Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.

                  2. Select an available event

                  3. A link such as Registration: Deadline is 03/15/2004 10:00am. +

                    <master>

                    If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/$OPENACS_SERVICE_NAME/www, this is /var/lib/aolserver/$OPENACS_SERVICE_NAME/www/default-master.adp and the associated .tcl file. +

                  4. The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/site-master.adp and .tcl)

                  5. The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/$OPENACS_SERVICE_NAME/www/blank-master.adp and .tcl).

                  6. Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

                Figure�4.1.�Site Templates

                Site Templates

                How do I diagnose a permissions problem?

                • Steps to Reproduce.�The events package does not allow users to register for new events.

                  1. Go to the http://yourserver.net/events as a visitor (ie, log out and, if necessary, clear cookies). This in on a 4.6.3 site with events version 0.1d3.

                  2. Select an available event

                  3. A link such as Registration: Deadline is 03/15/2004 10:00am. � Login or sign up to register for this event. is visible. Click on "Login or sign up" -

                  4. Complete a new registration. Afterwards, you should be redirected back to the same page.

                  Actual Results: The page says "You do not have permission to register for this event."

                  Expected results: A link or form to sign up for the event is shown.

                • Finding the problem.�We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/service0/packages/events/www/event-info.tcl. It contains this line:

                  set can_register_p [events::security::can_register_for_event_p -event_id $event_id]

                  We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply

                  return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]

                  This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.

                • Setting Permissions.�A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.

                  1. To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".

                  2. Click "Grant Permission"

                  3. Grant the write permission to Registered Users.

                    Figure�4.2.�Granting Permissions

                    Granting Permissions

                  OpenACS 5.0 offers a prettier version at /admin/applications.

                  Figure�4.3.�Granting Permissions in 5.0

                  Granting Permissions in 5.0
                View comments on this page at openacs.org
                +

              • Complete a new registration. Afterwards, you should be redirected back to the same page.

        Actual Results: The page says "You do not have permission to register for this event."

        Expected results: A link or form to sign up for the event is shown.

      • Finding the problem.�We start with the page that has the error. In the URL it's http://myserver.net/events/event-info.tcl, so open the file /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/events/www/event-info.tcl. It contains this line:

        set can_register_p [events::security::can_register_for_event_p -event_id $event_id]

        We need to know what that procedure does, so go to /api-doc, paste events::security::can_register_for_event_p into the ACS Tcl API Search box, and click Feeling Lucky. The next pages shows the proc, and we click "show source" to see more information. The body of the proc is simply

        return [permission::permission_p -party_id $user_id -object_id $event_id -privilege write]

        This means that a given user must have the write privilige on the event in order to register. Let's assume that the priviliges inherit, so that if a user has the write privilige on the whole package, they will have the write privilege on the event.

      • Setting Permissions.�A permission has three parts: the privilige, the object of the privilige, and the subject being granted the privilige. In this case the privilige is "write," the object is the Events package, and the subject is all Registered Users.

        1. To grant permissions on a package, start at the site map. Find the event package and click "Set permissions".

        2. Click "Grant Permission"

        3. Grant the write permission to Registered Users.

          Figure�4.2.�Granting Permissions

          Granting Permissions

        OpenACS 5.0 offers a prettier version at /admin/applications.

        Figure�4.3.�Granting Permissions in 5.0

        Granting Permissions in 5.0
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-convert.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-convert.html,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-core-docs/www/i18n-convert.html 5 May 2004 12:36:03 -0000 1.10 +++ openacs-4/packages/acs-core-docs/www/i18n-convert.html 11 Jun 2004 10:17:37 -0000 1.11 @@ -1,4 +1,4 @@ -How to Internationalize a Package

    How to Internationalize a Package

    Tip

    +How to Internationalize a Package

    How to Internationalize a Package

    Tip

    For multilingual websites we recommend using the UTF8 charset. In order for AOLserver to use utf8 you need to set the config parameters OutputCharset and @@ -63,14 +63,15 @@ are always is done with one of the valid lookups described above. The script further assumes that you have perl installed and in your path. Run the script like this: -

    - acs-lang/bin/check-catalog.sh package_key -

    + + acs-lang/bin/check-catalog.sh package_key + +

    where package_key is the key of the package that you want to test. If you don't provide the package_key argument then all packages with catalog files will be checked. The script will run its checks primarily on en_US xml catalog files. -

    Avoiding common i18n mistakes

    • Replace complicated keys with longer, simpler keys.�When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

      The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

        <p class="form-help-text"><b>Invitations</b> are sent,
      +      

    Avoiding common i18n mistakes

    • Replace complicated keys with longer, simpler keys.�When writing in one language, it is possible to create clever code to make correct text. In English, for example, you can put an if command at the end of a word which adds "s" if a count is anything but 1. This pluralizes nouns correctly based on the data. However, it is confusing to read and, when internationalized, may result in message keys that are both confusing and impossible to set correctly in some languages. While internationalizing, watch out that the automate converter does not create such keys. Also, refactor compound text as you encounter it.

      The automated system can easily get confused by tags within message texts, so that it tries to create two or three message keys for one long string with a tag in the middle. In these cases, uncheck those keys during the conversion and then edit the files directly. For example, this code:

        <p class="form-help-text"><b>Invitations</b> are sent,
                 when this wizard is completed and casting begins.</p>

      has a bold tag which confuses the converter into thinking there are two message keys for the text beginning "Invitations ..." where there should be one:

      Instead, we cancel those keys, edit the file manually, and put in a single temporary message tag:

        <p class="form-help-text"> <#Invitations_are_sent <b>Invitations</b> are sent, 
       when this wizard is completed and casting begins.#>
         </p>

      Complex if statements may produce convoluted message keys that are very hard to localize. Rewrite these if statements. For example:

      Select which case <if @simulation.casting_type@ eq "open">and
      @@ -155,6 +156,6 @@
       <msg key="Fix_1">for</msg>
       <msg key="Fix_2">for Bugs</msg>

      Another example: Bug-tracker component maintainer" was converted to "[_ bug-tracker.Bug-tracker]". Instead, it should be bug_tracker_component_maintainer.

    • Translations in Avoid "clever" message reuse.�Translations may need to differ depending on the context in which the message appears. -

    • Quoting in the message catalog for tcl.�Watch out for quoting and escaping when editing text that is also code. For example, the original string

      set title "Patch \"$patch_summary\" is nice."

      breaks if the message text retains all of the escaping that was in the tcl command:

      <msg>Patch \"$patch_summary\" is nice.</msg>

      When it becomes a key, it should be:

      <msg>Patch "$patch_summary" is nice.</msg>

      Also, some keys had %var;noquote%, which is not needed since those +

    • Avoid plurals.�Different languages create plurals differently. Try to avoid keys which will change based on the value of a number. OpenACS does not currently support internationalization of plurals. If you use two different keys, a plural and a singular form, your application will not localize properly for locales which use different rules or have more than two forms of plurals.

    • Quoting in the message catalog for tcl.�Watch out for quoting and escaping when editing text that is also code. For example, the original string

      set title "Patch \"$patch_summary\" is nice."

      breaks if the message text retains all of the escaping that was in the tcl command:

      <msg>Patch \"$patch_summary\" is nice.</msg>

      When it becomes a key, it should be:

      <msg>Patch "$patch_summary" is nice.</msg>

      Also, some keys had %var;noquote%, which is not needed since those variables are not quoted (and in fact the variable won't even be recognized so you get the literal %var;noquote% in the output).

    • Be careful with curly brackets.�Code within curly brackets isn't evaluated. TCL uses curly brackets as an alternative way to build lists. But TCL also uses curly brackets as an alternative to quotation marks for quoting text. So this original code

      array set names { key "Pretty" ...} 

      ... if converted to

      array set names { key "[_bug-tracker.Pretty]" ...} 

      ... won't work since the _ func will not be called. Instead, it should be

      array set names [list key [_bug-tracker.Pretty] ...]
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-design.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/i18n-design.html 5 May 2004 12:36:03 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/i18n-design.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1,2 +1,2 @@ -Design Notes

    Design Notes

    User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:

    1. Use user preference for this package (stored in ad_locale_user_prefs)

    2. Use system preference for the package (stored in apm_packages)

    3. Use user's general preference (stored in user_preferences)

    4. Use Browser header (Accept-Language HTTP header)

    5. Use system locale (an APM parameter for acs_lang)

    6. default to en_US

    For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is +Design Notes

    Design Notes

    User locale is a property of ad_conn, ad_conn locale. The request processor sets this by calling lang::conn::locale, which looks for the following in order of precedence:

    1. Use user preference for this package (stored in ad_locale_user_prefs)

    2. Use system preference for the package (stored in apm_packages)

    3. Use user's general preference (stored in user_preferences)

    4. Use Browser header (Accept-Language HTTP header)

    5. Use system locale (an APM parameter for acs_lang)

    6. default to en_US

    For ADP pages, message key lookup occurs in the templating engine. For TCL pages, message key lookup happens with the _ function. In both cases, if the requested locale is not found but a locale which is the default for the language which matches your locale's language is found, then that locale is offered instead.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-introduction.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-introduction.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/i18n-introduction.html 5 May 2004 12:36:03 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/i18n-introduction.html 11 Jun 2004 10:17:37 -0000 1.7 @@ -1,4 +1,4 @@ -How Internationalization/Localization works in OpenACS

    How Internationalization/Localization works in OpenACS

    +How Internationalization/Localization works in OpenACS

    How Internationalization/Localization works in OpenACS

    This document describes how to develop internationalized OpenACS packages, including writing new packages with internationalization and converting old packages. Text that @@ -22,7 +22,7 @@ database must use internationalized functions. All displayed dates must use internationalized functions. All displayed numbers must use internationalized functions. -

    User Content

    OpenACS does not have a general system for supporting multiple, localized versions of user-input content. This document currently refers only to internationalizing the text in the package user interface.

    +

    Localizable text must be handled in ADP files, in TCL files, and in APM Parameters. OpenACS provides two approaches, message keys and localized ADP files. For ADP pages which are mostly @@ -32,7 +32,7 @@ which are static and mostly text, it may be easier to create a new ADP page for each language. In this case, the pages are distinguished by a file naming convention. -

    Separate Templates for each Locale

    If the request processor finds a file named filename.locale.adp, where locale matches the user's locale, it will process that file instead of filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are processed normally.

    Message Catalogs

    Message Keys in Template Files (ADP Files)

    +

    User Content

    OpenACS does not have a general system for supporting multiple, localized versions of user-input content. This document currently refers only to internationalizing the text in the package user interface.

    Separate Templates for each Locale

    If the request processor finds a file named filename.locale.adp, where locale matches the user's locale, it will process that file instead of filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are processed normally.

    Message Catalogs

    Message Keys in Template Files (ADP Files)

    Internationalizing templates is about replacing human readable text in a certain language with internal message keys, which can then be dynamically replaced with real human language in @@ -90,13 +90,14 @@

    • Typical static key lookup: [_ package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.

    • Static key lookup with non-default locale: [lang::message::lookup $locale package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.

    • Dynamic key lookup: [lang::util::localize $var_with_embedded_message_keys] - In this case the message keys in the variable var_with_embedded_message_keys must appear as string literals \#package_key.message_key\# somewhere in the code. Here is an example of a dynamic lookup: -

      set message_key_array { + set message_key_array { dynamic_key_1 \#package_key.message_key1\# dynamic_key_2 \#package_key.message_key2\# } set my_text [lang::util::localize $message_key_array([get_dynamic_key])] -

    + +

    Translatable texts in page TCL scripts are often found in page titles, context bars, and form labels and options. Many times the texts are @@ -122,24 +123,26 @@ variables and or procedure calls in it you should in most cases try to turn the whole text into one message in the catalog (remember that translators is made easier the longer the phrases to translate are). In those cases, follow these steps: -

    • For each message call in the text, decide on a variable name and replace +

      • + For each message call in the text, decide on a variable name and replace the procedure call with a variable lookup on the syntax %var_name%. Remember - to initialize a tcl variable with the same name on some line above the text.

      • If the text is in a tcl file you must replace variable lookups - (occurences of $var_name or ${var_name}) with %var_name%
      • You are now ready to follow the normal procedure and mark up the text using a + to initialize a tcl variable with the same name on some line above the text.

      • If the text is in a tcl file you must replace variable lookups + (occurences of $var_name or ${var_name}) with %var_name%

      • You are now ready to follow the normal procedure and mark up the text using a tempoarary message tag (<#_ text_with_percentage_vars#>) and run the action - replace tags with keys in the APM.

      + replace tags with keys in the APM.

    The variable values in the message are usually fetched with upvar, here is an example from dotlrn: -

    + ad_return_complaint 1 "Error: A [parameter::get -parameter classes_pretty_name] must have <em>no</em>[parameter::get -parameter class_instances_pretty_plural] to be deleted" -

    + was replaced by: -

    + set subject [parameter::get -localize -parameter classes_pretty_name] set class_instances [parameter::get -localize -parameter class_instances_pretty_plural] ad_return_complaint 1 [_ dotlrn.class_may_not_be_deleted] -

    + +

    This kind of interpolation also works in adp files where adp variable values will be inserted into the message.

    Alternatively, you may pass in an array list of the variable values to be interpolated into the message so that @@ -206,4 +209,4 @@

    Developers are responsible for creating the keys in the message catalog, which is available at /acs-lang/admin/ -

    View comments on this page at openacs.org
    +

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-overview.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/i18n-overview.html 5 May 2004 12:36:04 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/i18n-overview.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1 +1 @@ -

    Table�14.1.�Internationalization and Localization

    StageTaskWho
    InternationalizationPackage Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information)Package Developer
    Release ManagementThe newly internationalized package is released.Package Developer
    The translation server is updated with the new package.Translation server maintainers
    LocalizationTranslators work in their respective locales to write text for each message key. (More information)Translators
    Release ManagementThe translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server.Translation server maintainers
    The catalog files are committed to the OpenACS code base.Translation server maintainers
    A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository.Release Manager
    UpgradingSite Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators
    Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten.Site Administrators
    View comments on this page at openacs.org
    +Internationalization and Localization

    Internationalization and Localization

    Table�14.1.�Internationalization and Localization

    StageTaskWho
    InternationalizationPackage Developer uses the acs-lang tools to replace all visible text in a package with message keys. (More information)Package Developer
    Release ManagementThe newly internationalized package is released.Package Developer
    The translation server is updated with the new package.Translation server maintainers
    LocalizationTranslators work in their respective locales to write text for each message key. (More information)Translators
    Release ManagementThe translated text in the database of the translation server is compared to the current translations in the OpenACS code base, conflicts are resolved, and the new text is written to catalog files on the translation server.Translation server maintainers
    The catalog files are committed to the OpenACS code base.Translation server maintainers
    A new version of OpenACS core and/or affected packages is released and published in the OpenACS.org repository.Release Manager
    UpgradingSite Administrators upgrade their OpenACS sites, either via the automatic upgrade from the Repository or via tarball or CVS Site Administrators
    Site Administrators import the new translations. Existing local translations, if they exist, are not overwritten.Site Administrators
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-requirements.html,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/i18n-requirements.html 5 May 2004 12:36:04 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/i18n-requirements.html 11 Jun 2004 10:17:37 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    by Henry Minsky, +OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    by Henry Minsky, Yon Feldman, Lars Pind, Peter Marklund, Index: openacs-4/packages/acs-core-docs/www/i18n-translators.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-translators.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/i18n-translators.html 5 May 2004 12:36:04 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/i18n-translators.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1 +1 @@ -Translator's Guide

    Translator's Guide

    Most translators use the OpenACS Public Translation Server, because the process of getting new message keys onto the server and getting new translations back into the distribution are handled by the maintainers of that machine. You can also do translation work on your own OpenACS site; this makes your own translations more readily available to you but also means that your work will not be shared with other users unless you take extra steps (contacting an OpenACS core developer or submitting a patch) to get your work back to the OpenACS core.

    The basic steps for translators:

    • Go to the Localization page and choose the locale that you are translating to. If the locale is not present you need to visit Administration of Localization and create the locale.

    • Translating with Translator Mode.�To translate messages in the pages they appear, Toggle Translator Mode and then browse to the page you want to translate. Untranslated messages will have a yellow background and a red star that you click to translate the message. Translated messages have a green star next to them that is a hyperlink to editing your translation. There is a history mechanism that allows you to see previous translations in case you would want to revert a translation.

      While in Translator mode, a list of all message keys appears at the bottom of each page.

    • Batch translation.�To translate many messages at once, go to Administration of Localization, click on the locale to translate, then click on a package, and then click Batch edit these messages.

    View comments on this page at openacs.org
    +Translator's Guide

    Translator's Guide

    Most translators use the OpenACS Public Translation Server, because the process of getting new message keys onto the server and getting new translations back into the distribution are handled by the maintainers of that machine. You can also do translation work on your own OpenACS site; this makes your own translations more readily available to you but also means that your work will not be shared with other users unless you take extra steps (contacting an OpenACS core developer or submitting a patch) to get your work back to the OpenACS core.

    The basic steps for translators:

    • Go to the Localization page and choose the locale that you are translating to. If the locale is not present you need to visit Administration of Localization and create the locale.

    • Translating with Translator Mode.�To translate messages in the pages they appear, Toggle Translator Mode and then browse to the page you want to translate. Untranslated messages will have a yellow background and a red star that you click to translate the message. Translated messages have a green star next to them that is a hyperlink to editing your translation. There is a history mechanism that allows you to see previous translations in case you would want to revert a translation.

      While in Translator mode, a list of all message keys appears at the bottom of each page.

    • Batch translation.�To translate many messages at once, go to Administration of Localization, click on the locale to translate, then click on a package, and then click Batch edit these messages.

    When creating a new locale based on an existing one, such as creating the Guatamalan version of Spanish, you can copy the existing locale's catalog files using the script /packages/acs-core-docs/www/files/create-new-catalog.sh.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/i18n.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/i18n.html 5 May 2004 12:36:04 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/i18n.html 11 Jun 2004 10:17:37 -0000 1.23 @@ -1,7 +1,7 @@ -Chapter�14.�Internationalization

    Chapter�14.�Internationalization

    +Chapter�14.�Internationalization

    Chapter�14.�Internationalization

    By Peter Marklund and Lars Pind

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
    View comments on this page at openacs.org
    +
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/index.html,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-core-docs/www/index.html 5 May 2004 12:36:04 -0000 1.37 +++ openacs-4/packages/acs-core-docs/www/index.html 11 Jun 2004 10:17:37 -0000 1.38 @@ -1 +1 @@ -OpenACS Core Documentation

    OpenACS Core Documentation


    Table of Contents

    I. OpenACS For Everyone
    1. High level information: What is OpenACS?
    Overview
    OpenACS Release Notes
    II. Administrator's Guide
    2. Installation Overview
    Basic Steps
    Prerequisite Software
    3. Complete Installation
    Install a Unix-like system and supporting software
    Install Oracle 8.1.7
    Install PostgreSQL
    Install AOLserver 4
    Install OpenACS 5.2.0d1
    OpenACS Installation Guide for Windows2000
    OpenACS Installation Guide for Mac OS X
    4. Configuring a new OpenACS Site
    How Do I?
    5. Upgrading
    Overview
    Upgrading 4.5 or higher to 4.6.3
    Upgrading OpenACS 4.6.3 to 5.0
    Upgrading 5.0.0 to 5.0.x
    Upgrading the OpenACS files
    Upgrading Platform components
    6. Production Environments
    Starting and Stopping an OpenACS instance.
    AOLserver keepalive with inittab
    Running multiple services on one machine
    High Availability/High Performance Configurations
    Staged Deployment for Production Networks
    Installing SSL Support for an OpenACS service
    Set up Log Analysis Reports
    External uptime validation
    Diagnosing Performance Problems
    7. Database Management
    Running a PostgreSQL database on another server
    Deleting a tablespace
    Vacuum Postgres nightly
    8. Backup and Recovery
    Backup Strategy
    Manual backup and recovery
    Automated Backup
    Using CVS for backup-recovery
    A. Install Red Hat 8/9
    B. Install additional supporting software
    Unpack the OpenACS tarball
    Initialize CVS (OPTIONAL)
    Add PSGML commands to emacs init file (OPTIONAL)
    Install Daemontools (OPTIONAL)
    Install qmail (OPTIONAL)
    Install Analog web file analyzer
    Install nspam
    Install Full Text Search
    Install nsopenssl
    Install tclwebtest.
    Install PHP for use in AOLserver
    Install Squirrelmail for use as a webmail system for OpenACS
    Install AOLserver 3.3oacs1
    A. Credits
    Where did this document come from?
    Linux Install Guides
    Security Information
    Resources
    III. For OpenACS Package Developers
    1. Development Tutorial
    Creating an Application Package
    Setting Up Database Objects
    Creating Web Pages
    Debugging and Automated Testing
    2. Advanced Topics
    Write the Requirements and Design Specs
    Add the new package to CVS
    Adding Comments
    Admin Pages
    Categories
    Categories
    Profile your code
    Prepare the package for distribution.
    Notifications
    Hierarchical data
    Using .vuh files for pretty urls
    Future Topics
    3. Development Reference
    OpenACS Packages
    OpenACS Data Models and the Object System
    The Request Processor
    The OpenACS Database Access API
    Using Templates in OpenACS
    Groups, Context, Permissions
    Writing OpenACS Application Pages
    Parties in OpenACS
    OpenACS Permissions Tediously Explained
    Object Identity
    Programming with AOLserver
    Using HTML Forms
    4. Engineering Standards
    OpenACS Style Guide
    Release Version Numbering
    Constraint naming standard
    ACS File Naming and Formatting Standards
    PL/SQL Standards
    Variables
    Automated Testing
    5. Documentation Standards
    OpenACS Documentation Guide
    Using PSGML mode in Emacs
    Using nXML mode in Emacs
    Detailed Design Documentation Template
    System/Application Requirements Template
    6. Internationalization
    How Internationalization/Localization works in OpenACS
    How to Internationalize a Package
    Design Notes
    Translator's Guide
    B. Using CVS with an OpenACS Site
    IV. For OpenACS Platform Developers
    7. Kernel Documentation
    Overview
    Object Model Requirements
    Object Model Design
    Permissions Requirements
    Permissions Design
    Groups Requirements
    Groups Design
    Subsites Requirements
    Subsites Design Document
    Package Manager Requirements
    Package Manager Design
    Database Access API
    OpenACS Internationalization Requirements
    Security Requirements
    Security Design
    Security Notes
    Request Processor Requirements
    Request Processor Design
    Documenting Tcl Files: Page Contracts and Libraries
    Bootstrapping OpenACS
    External Authentication Requirements
    8. Releasing OpenACS
    OpenACS Core and .LRN
    How to Update the OpenACS.org repository
    How to package and release an OpenACS Package
    How to Update the translations
    Index
    View comments on this page at openacs.org
    +OpenACS Core Documentation

    OpenACS Core Documentation


    Table of Contents

    I. OpenACS For Everyone
    1. High level information: What is OpenACS?
    Overview
    OpenACS Release Notes
    II. Administrator's Guide
    2. Installation Overview
    Basic Steps
    Prerequisite Software
    3. Complete Installation
    Install a Unix-like system and supporting software
    Install Oracle 8.1.7
    Install PostgreSQL
    Install AOLserver 4
    Install OpenACS 5.2.0d1
    OpenACS Installation Guide for Windows2000
    OpenACS Installation Guide for Mac OS X
    4. Configuring a new OpenACS Site
    How Do I?
    5. Upgrading
    Overview
    Upgrading 4.5 or higher to 4.6.3
    Upgrading OpenACS 4.6.3 to 5.0
    Upgrading 5.0.0 to 5.0.x
    Upgrading the OpenACS files
    Upgrading Platform components
    6. Production Environments
    Starting and Stopping an OpenACS instance.
    AOLserver keepalive with inittab
    Running multiple services on one machine
    High Availability/High Performance Configurations
    Staged Deployment for Production Networks
    Installing SSL Support for an OpenACS service
    Set up Log Analysis Reports
    External uptime validation
    Diagnosing Performance Problems
    7. Database Management
    Running a PostgreSQL database on another server
    Deleting a tablespace
    Vacuum Postgres nightly
    8. Backup and Recovery
    Backup Strategy
    Manual backup and recovery
    Automated Backup
    Using CVS for backup-recovery
    A. Install Red Hat 8/9
    B. Install additional supporting software
    Unpack the OpenACS tarball
    Initialize CVS (OPTIONAL)
    Add PSGML commands to emacs init file (OPTIONAL)
    Install Daemontools (OPTIONAL)
    Install qmail (OPTIONAL)
    Install Analog web file analyzer
    Install nspam
    Install Full Text Search
    Install nsopenssl
    Install tclwebtest.
    Install PHP for use in AOLserver
    Install Squirrelmail for use as a webmail system for OpenACS
    Install AOLserver 3.3oacs1
    A. Credits
    Where did this document come from?
    Linux Install Guides
    Security Information
    Resources
    III. For OpenACS Package Developers
    1. Development Tutorial
    Creating an Application Package
    Setting Up Database Objects
    Creating Web Pages
    Debugging and Automated Testing
    2. Advanced Topics
    Write the Requirements and Design Specs
    Add the new package to CVS
    Adding Comments
    Admin Pages
    Categories
    Profile your code
    Prepare the package for distribution.
    Notifications
    Hierarchical data
    Using .vuh files for pretty urls
    Future Topics
    3. Development Reference
    OpenACS Packages
    OpenACS Data Models and the Object System
    The Request Processor
    The OpenACS Database Access API
    Using Templates in OpenACS
    Groups, Context, Permissions
    Writing OpenACS Application Pages
    Parties in OpenACS
    OpenACS Permissions Tediously Explained
    Object Identity
    Programming with AOLserver
    Using HTML Forms
    4. Engineering Standards
    OpenACS Style Guide
    Release Version Numbering
    Constraint naming standard
    ACS File Naming and Formatting Standards
    PL/SQL Standards
    Variables
    Automated Testing
    5. Documentation Standards
    OpenACS Documentation Guide
    Using PSGML mode in Emacs
    Using nXML mode in Emacs
    Detailed Design Documentation Template
    System/Application Requirements Template
    6. Internationalization
    Internationalization and Localization
    How Internationalization/Localization works in OpenACS
    How to Internationalize a Package
    Design Notes
    Translator's Guide
    B. Using CVS with an OpenACS Site
    IV. For OpenACS Platform Developers
    7. Kernel Documentation
    Overview
    Object Model Requirements
    Object Model Design
    Permissions Requirements
    Permissions Design
    Groups Requirements
    Groups Design
    Subsites Requirements
    Subsites Design Document
    Package Manager Requirements
    Package Manager Design
    Database Access API
    OpenACS Internationalization Requirements
    Security Requirements
    Security Design
    Security Notes
    Request Processor Requirements
    Request Processor Design
    Documenting Tcl Files: Page Contracts and Libraries
    Bootstrapping OpenACS
    External Authentication Requirements
    8. Releasing OpenACS
    OpenACS Core and .LRN
    How to Update the OpenACS.org repository
    How to package and release an OpenACS Package
    How to Update the translations
    Index
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/individual-programs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/individual-programs.html,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/individual-programs.html 5 May 2004 12:36:04 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/individual-programs.html 11 Jun 2004 10:17:37 -0000 1.22 @@ -1,4 +1,4 @@ -Prerequisite Software

    Prerequisite Software

    by Joel Aufrecht

    +Prerequisite Software

    Prerequisite Software

    by Joel Aufrecht

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Index: openacs-4/packages/acs-core-docs/www/install-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-cvs.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/install-cvs.html 5 May 2004 12:36:04 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/install-cvs.html 11 Jun 2004 10:17:37 -0000 1.26 @@ -1,4 +1,4 @@ -Initialize CVS (OPTIONAL)

    Initialize CVS (OPTIONAL)

    CVS is a source control system. Create and initialize a +Initialize CVS (OPTIONAL)

    Initialize CVS (OPTIONAL)

    CVS is a source control system. Create and initialize a directory for a local cvs repository.

    [root tmp]# mkdir /cvsroot
     [root tmp]# cvs -d /cvsroot init
     [root tmp]#
    Index: openacs-4/packages/acs-core-docs/www/install-daemontools.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-daemontools.html,v
    diff -u -r1.26 -r1.27
    --- openacs-4/packages/acs-core-docs/www/install-daemontools.html	5 May 2004 12:36:04 -0000	1.26
    +++ openacs-4/packages/acs-core-docs/www/install-daemontools.html	11 Jun 2004 10:17:37 -0000	1.27
    @@ -1,9 +1,9 @@
    -Install Daemontools (OPTIONAL)

    Install Daemontools (OPTIONAL)

    Daemontools is a collection of programs for controlling +Install Daemontools (OPTIONAL)

    Install Daemontools (OPTIONAL)

    Daemontools is a collection of programs for controlling other processes. We use daemontools to run and monitor AOLserver. It is installed in /package. These commands install daemontools and svgroup. svgroup is a script for granting permissions, to allow users other than root to use daemontools for specific - services.

    1. Install Daemontools

      download daemontools and install it.

      • Red Hat 8

        [root root]# mkdir -p /package
        +      services.

        1. Install Daemontools

          download daemontools and install it.

          • Red Hat 8

            [root root]# mkdir -p /package
             [root root]# chmod 1755 /package/
             [root root]# cd /package/
             [root package]# tar xzf /tmp/daemontools-0.76.tar.gz
            Index: openacs-4/packages/acs-core-docs/www/install-full-text-search.html
            ===================================================================
            RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/install-full-text-search.html,v
            diff -u -r1.24 -r1.25
            --- openacs-4/packages/acs-core-docs/www/install-full-text-search.html	5 May 2004 12:36:04 -0000	1.24
            +++ openacs-4/packages/acs-core-docs/www/install-full-text-search.html	11 Jun 2004 10:17:37 -0000	1.25
            @@ -1,7 +1,7 @@
            -Install Full Text Search

            Install Full Text Search

            By Joel Aufrecht and Malte Sussdorff

            +Install Full Text Search

            Install Full Text Search

            By Joel Aufrecht and Malte Sussdorff

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

            Install OpenFTS module

            If you want full text search, and you are running PostgreSQL, install this module to support FTS. Do this step after you have installed both PostgreSQL and +

            Install OpenFTS module

            If you want full text search, and you are running PostgreSQL, install this module to support FTS. Do this step after you have installed both PostgreSQL and AOLserver. You will need the openfts tarball in /tmp.

            1. Install Tsearch. This is a PostgreSQL module that OpenFTS requires.

              [root root]# su - postgres
              @@ -76,24 +76,30 @@
               make
               su postgres
               make install
              -exit

            Install OpenFTS prerequisites in PostgreSQL instance

            If you are installing Full Text Search, add required +exit

      Install OpenFTS prerequisites in PostgreSQL instance

      If you are installing Full Text Search, add required packages to the new database. (In order for full text search to work, you must also install the PostgreSQL - OpenFTS module and prerequisites.)

      [service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
      +        OpenFTS module and prerequisites.)

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
       BEGIN
       CREATE
       (many lines omitted)
       INSERT 0 1
       COMMIT
      -[service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
       CREATE
       CREATE
      -[service0 service0]$
      -/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
      -/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql

      Enable OpenFTS in config.tcl

      If you have installed OpenFTS, you can enable it for this service. Uncomment this line from config.tcl. (To uncomment a line in a tcl file, remove the # at the beginning of the line.)

      #ns_param   nsfts           ${bindir}/nsfts.so

      Install Full Text Search Engine

      1. Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.

      2. Click on the Install +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ +/usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql +/usr/local/pgsql/bin/psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql

    Note

    + If you get the error + ERROR: could not access file "$libdir/tsearch": no such file or directory + It is probably because PostgreSQL's libdir configuration variable points to a diffent directory than where tsearch is. + You can find out where PostgreSQL expects to find tsearch via +

    pg_config --pkglibdir

    +

    Enable OpenFTS in config.tcl

    If you have installed OpenFTS, you can enable it for this service. Uncomment this line from config.tcl. (To uncomment a line in a tcl file, remove the # at the beginning of the line.)

    #ns_param   nsfts           ${bindir}/nsfts.so

    Install Full Text Search Engine

    1. Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.

    2. Click on the Install software link.

    3. Click on the Install -new service link.

    4. Click on the Install link next to OpenFTS Driver.

    5. Restart the service.

      [service0 service0]$ svc -t /service/service0
      -[service0 service0]$
    6. Wait a minute, then browse back to the home page.

    7. Click on Admin on the top of the screen.

    8. Click on Main Site Administration in the "Subsite Administration" section.

    9. Click on Site Map in the "Advanced Features" section.

    10. Mount the OpenFTS Full Text Search Engine in the site map.

      1. Click the new sub folder link on the "/" line, the first line under Main Site:/.

      2. Type openfts +new service link.

      3. Click on the Install link next to OpenFTS Driver.

      4. Restart the service.

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
        +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
      5. Wait a minute, then browse back to the home page.

      6. Click on Admin on the top of the screen.

      7. Click on Main Site Administration in the "Subsite Administration" section.

      8. Click on Site Map in the "Advanced Features" section.

      9. Mount the OpenFTS Full Text Search Engine in the site map.

        1. Click the new sub folder link on the "/" line, the first line under Main Site:/.

        2. Type openfts and click New.

        3. On the new openfts line, click the mount link.

        4. Click OpenFTS Driver.

        5. On the openfts line, click set parameters.

        6. Change openfts_tcl_src_path to /usr/local/src/Search-OpenFTS-tcl-0.3.2/ and click Set Parameters

      10. Mount the Search interface in the site map.

        1. Click the @@ -107,17 +113,17 @@ search from the drop-down list, and click New. -

      11. Restart the service.

        [service0 service0]$ svc -t /service/service0
        -[service0 service0]$
      12. Wait a minute, then click on Main Site at the top of the page.

      13. Initialize the OpenFTS Engine. This creates a set of tables in the database to support FTS.

        Near the bottom of the page, click on the OpenFTS Driver link. Click on Administration. +

    11. Restart the service.

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
    12. Wait a minute, then click on Main Site at the top of the page.

    13. Initialize the OpenFTS Engine. This creates a set of tables in the database to support FTS.

      Near the bottom of the page, click on the OpenFTS Driver link. Click on Administration. Click on Initialize OpenFTS Engine. Click Initialize OpenFTS Engine.

    14. Add the FTS Engine service contract

      1. Click on the DevAdmin.

      2. Click on the Service Contract link.

      3. On the FtsEngineDriver line, click Install. -

    15. Restart the service.

      [service0 service0]$ svc -t /service/service0
      -[service0 service0]$

    Enable Full Text Search in packages

    Enabling Full Text Search in packages at the moment is not trivial. It involves a couple of steps, which I will illustrate taking lars-blogger as an example package

    1. Install the package. +

  • Restart the service.

    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ svc -t /service/$OPENACS_SERVICE_NAME
    +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
  • Enable Full Text Search in packages

    Enabling Full Text Search in packages at the moment is not trivial. It involves a couple of steps, which I will illustrate taking lars-blogger as an example package

    1. Install the package.

      1. Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.

      2. Click on the Install software link.

      3. Click on the Install new application link.

      4. Click on the Install link next to Weblogger.

      5. Install all required packages as well (always say okay until you shall restart the server)

      -

    2. Load the service contracts datamodell and enable the service contract

      [service0 service0]$ cd packages/lars-blogger/sql/postgresql
      -[service0 postgresql]$ psql service0 -f lars-blogger-sc-create.sql

      Note: Usually this script is called package_name-sc-create.sql

    3. Restart the service.

      [service0 postgresql]$ svc -t /service/service0
      -                [service0 postgresl]$

    If you are lucky, Full Text Search is enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. This link also contains some hints on how to make sure it is enabled.

    View comments on this page at openacs.org
    +

  • Load the service contracts datamodell and enable the service contract

    [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd packages/lars-blogger/sql/postgresql
    +[$OPENACS_SERVICE_NAME postgresql]$ psql $OPENACS_SERVICE_NAME -f lars-blogger-sc-create.sql

    Note: Usually this script is called package_name-sc-create.sql

  • Restart the service.

    [$OPENACS_SERVICE_NAME postgresql]$ svc -t /service/$OPENACS_SERVICE_NAME
    +                [$OPENACS_SERVICE_NAME postgresl]$
  • If you are lucky, Full Text Search is enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. This link also contains some hints on how to make sure it is enabled.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-more-software.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-more-software.html,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/install-more-software.html 5 May 2004 12:36:04 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/install-more-software.html 11 Jun 2004 10:17:37 -0000 1.12 @@ -1,4 +1,4 @@ -Appendix�B.�Install additional supporting software

    Appendix�B.�Install additional supporting software

    By Joel Aufrecht

    +Appendix�B.�Install additional supporting software

    Appendix�B.�Install additional supporting software

    By Joel Aufrecht

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    This section assumes that the source tarballs for supporting Index: openacs-4/packages/acs-core-docs/www/install-next-add-server.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-add-server.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-next-add-server.html 5 May 2004 12:36:04 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-next-add-server.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1,6 +1,6 @@ -Running multiple services on one machine

    Running multiple services on one machine

    Services on different ports.�To run a different service on another port but the same +Running multiple services on one machine

    Running multiple services on one machine

    Services on different ports.�To run a different service on another port but the same ip, simply repeat Install OpenACS 5.2.0d1 replacing - service0, and change the + $OPENACS_SERVICE_NAME, and change the

    set httpport              8000
     set httpsport             8443 

    to different values.

    Services on different host names.�For example, suppose you want to support Index: openacs-4/packages/acs-core-docs/www/install-next-backups.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-backups.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-next-backups.html 5 May 2004 12:36:04 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-next-backups.html 11 Jun 2004 10:17:37 -0000 1.3 @@ -1,4 +1,4 @@ -Backup Strategy

    Backup Strategy

    +Backup Strategy

    Backup Strategy

    The purpose of backup is to enable recovery. Backup and recovery are always risky; here are some steps that minimize the chance recovery is necessary: @@ -27,9 +27,9 @@ OpenACS installations comprise files and database contents. If you follow the reference install and put all files, including configuration files, in - /var/lib/aolserver/service0/, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/, and back up the database nightly to a file in - /var/lib/aolserver/service0/database-backup, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup, then you can apply standard file-based backup strategies to - /var/lib/aolserver/service0 + /var/lib/aolserver/$OPENACS_SERVICE_NAME

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 5 May 2004 12:36:04 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/install-next-nightly-vacuum.html 11 Jun 2004 10:17:37 -0000 1.10 @@ -1,4 +1,4 @@ -Vacuum Postgres nightly

    Vacuum Postgres nightly

    +Vacuum Postgres nightly

    Vacuum Postgres nightly

    The "vacuum" command must be run periodically to reclaim space in versions of PostgreSQL before 7.4. The "vacuum analyze" form additionally collects statistics on the @@ -15,4 +15,4 @@ step.

    Edit your crontab:

    [joeuser ~]$ crontab -e

    We'll set vacuum up to run nightly at 1 AM. Add the following line:

    -0 1 * * * /usr/local/pgsql/bin/vacuumdb service0
    ($Id$)
    View comments on this page at openacs.org
    +0 1 * * * /usr/local/pgsql/bin/vacuumdb $OPENACS_SERVICE_NAME
    ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-nsopenssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-nsopenssl.html,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 5 May 2004 12:36:04 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 11 Jun 2004 10:17:37 -0000 1.16 @@ -1,4 +1,4 @@ -Install nsopenssl

    Install nsopenssl

    By Joel Aufrecht and Malte Sussdorff

    +Install nsopenssl

    Install nsopenssl

    By Joel Aufrecht and Malte Sussdorff

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    This AOLserver module is required if you want people to connect to your site via Index: openacs-4/packages/acs-core-docs/www/install-nspam.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-nspam.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/install-nspam.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/install-nspam.html 11 Jun 2004 10:17:37 -0000 1.7 @@ -1 +1 @@ -Install nspam

    View comments on this page at openacs.org
    +Install nspam
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html 5 May 2004 12:36:04 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-openacs-delete-tablespace.html 11 Jun 2004 10:17:37 -0000 1.3 @@ -1,24 +1,24 @@ -Deleting a tablespace

    Deleting a tablespace

    Skip down for instructions on Deleting a PostgreSQL tablespace. +Deleting a tablespace

    Deleting a tablespace

    Skip down for instructions on Deleting a PostgreSQL tablespace.

    Deleting an Oracle tablespace

    Should it become necessary to rebuild a tablespace from scratch, you can use the drop user command in SVRMGRL with the cascade option. This command will drop the user and every database object - the user owns.

    SVRMGR> drop user service0 cascade;

    + the user owns.

    SVRMGR> drop user $OPENACS_SERVICE_NAME cascade;

    If this does not work because svrmgrl "cannot drop a user that is currently connected", make sure to kill the AOLserver using - this user. If it still does not work, do:

    SVRMGR> select username, sid, serial# from v$session where lower(username)='service0';

    and then

    SVRMGR> alter system kill session 'sid, serial#';

    + this user. If it still does not work, do:

    SVRMGR> select username, sid, serial# from v$session where lower(username)='$OPENACS_SERVICE_NAME';

    and then

    SVRMGR> alter system kill session 'sid, serial#';

    where sid and serial# are replaced with the corresponding values for the open session.

    Use with caution!

    If you feel the need to delete everything - related to the service, you can also issue the following:

    SVRMGR> drop tablespace service0 including contents cascade constraints;

    Deleting a PostgreSQL tablespace

    + related to the service, you can also issue the following:

    SVRMGR> drop tablespace $OPENACS_SERVICE_NAME including contents cascade constraints;

    Deleting a PostgreSQL tablespace

    Dropping a PostgreSQL tablespace is easy. You have to stop any AOLserver instances that are using the database that you wish to drop. If you're using daemontools, this is simple, just use the 'down' flag (-d). If you're using inittab, you have to comment out your server in /etc/inittab, reread the inittab with /sbin/init q, and then restart-aolserver - service0.

    Then, to drop the db, just do:

    -[service0 ~]$ dropdb service0
    +        $OPENACS_SERVICE_NAME.

    Then, to drop the db, just do:

    +[$OPENACS_SERVICE_NAME ~]$ dropdb $OPENACS_SERVICE_NAME
     DROP DATABASE
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-openacs-inittab.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-inittab.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-openacs-inittab.html 5 May 2004 12:36:04 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-openacs-inittab.html 11 Jun 2004 10:17:37 -0000 1.3 @@ -1,4 +1,4 @@ -AOLserver keepalive with inittab

    AOLserver keepalive with inittab

    This is an alternative method for keeping the AOLserver +AOLserver keepalive with inittab

    AOLserver keepalive with inittab

    This is an alternative method for keeping the AOLserver process running. The recommended method is to run AOLserver supervised.

    This step should be completed as root. This can break every service Index: openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 5 May 2004 12:36:04 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/install-openacs-keepalive.html 11 Jun 2004 10:17:37 -0000 1.10 @@ -1,4 +1,4 @@ -Starting and Stopping an OpenACS instance.

    Starting and Stopping an OpenACS instance.

    The simplest way to start and stop and OpenACS site is to run the startup shell script provided, /var/lib/aolserver/service0/etc/daemontools/run. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.

    A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.

    The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.

    1. Daemontools must already be installed. If not, install it.

    2. Each service controlled by daemontools must have a +Starting and Stopping an OpenACS instance.

      Starting and Stopping an OpenACS instance.

      The simplest way to start and stop and OpenACS site is to run the startup shell script provided, /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.

      A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.

      The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.

      1. Daemontools must already be installed. If not, install it.

      2. Each service controlled by daemontools must have a directory in /service. That directory must have a file called run. It works like this:

        • The init program starts every @@ -11,58 +11,58 @@ looks for a file in the subdirectory called run. If it finds a run file, it creates a supervise process

        • supervise executes the run script. Whenever the run script stops, supervise executes it again. It also creates additional control files in the same directory.

        Hence, the AOLserver instance for your development server is started by the file - /service/service0/run. + /service/$OPENACS_SERVICE_NAME/run. But we use a symlink to make it easier to add and remove stuff from the /service, so the actual location is - /var/lib/aolserver/service0etc/daemontools/run.

        Daemontools creates additional files and directories to track status and + /var/lib/aolserver/$OPENACS_SERVICE_NAMEetc/daemontools/run.

        Daemontools creates additional files and directories to track status and log. A daemontools directory is included in the OpenACS tarball at - /var/lib/aolserver/service0/etc/daemontools. To use it, first ill any existing AOLserver instances. As root, link the daemontools directory into the /service directory. Daemontools' svscan process checks this directory every five seconds, and will quickly execute run.

        [service0 etc]$ killall nsd
        +        /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools.  To use it, first ill any existing AOLserver instances.  As root, link the daemontools directory into the /service directory.  Daemontools' svscan process checks this directory every five seconds, and will quickly execute run.

        [$OPENACS_SERVICE_NAME etc]$ killall nsd
         nsd: no process killed
        -[service0 etc]$ emacs /var/lib/aolserver/service0/etc/daemontools/run
        -[service0 etc]$ exit
        +[$OPENACS_SERVICE_NAME etc]$ emacs /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run
        +[$OPENACS_SERVICE_NAME etc]$ exit
         
        -[root root]# ln -s /var/lib/aolserver/service0/etc/daemontools/ /service/service0

        Verify that AOLserver is running.

        [root root]# ps -auxw | grep nsd
        -service0   5562 14.2  6.2 22436 15952 ?       S    11:55   0:04 /usr/local/aolserver/bin/nsd -it /var/lib/aolserver/service0/etc/config.tcl -u serve
        +[root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/ /service/$OPENACS_SERVICE_NAME

        Verify that AOLserver is running.

        [root root]# ps -auxw | grep nsd
        +$OPENACS_SERVICE_NAME   5562 14.2  6.2 22436 15952 ?       S    11:55   0:04 /usr/local/aolserver/bin/nsd -it /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl -u serve
         root      5582  0.0  0.2  3276  628 pts/0    S    11:55   0:00 grep nsd
        -[root root]#
      3. The user service0 can now control the service service0 with these commands:

        • +[root root]#

        • The user $OPENACS_SERVICE_NAME can now control the service $OPENACS_SERVICE_NAME with these commands:

          • - svc -d /service/service0 - + svc -d /service/$OPENACS_SERVICE_NAME - Bring the server down

          • - svc -u /service/service0 - + svc -u /service/$OPENACS_SERVICE_NAME - Start the server up and leave it in keepalive mode.

          • - svc -o /service/service0 - + svc -o /service/$OPENACS_SERVICE_NAME - Start the server up once. Do not restart it if it stops.

          • - svc -t /service/service0 - + svc -t /service/$OPENACS_SERVICE_NAME - Stop and immediately restart the server.

          • - svc -k /service/service0 - + svc -k /service/$OPENACS_SERVICE_NAME - Sends the server a KILL signal. This is like KILL -9. AOLserver exits immediately. If svc -t fails to fully kill AOLserver, use this option. This does not take the server out of keepalive mode, so it should still bounce back up immediately.

        • Install a script to automate the stopping and starting - of AOLserver services via daemontools. You can then restart a service via restart-aolserver service0

          [root root]# cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
          +          of AOLserver services via daemontools.  You can then restart a service via restart-aolserver $OPENACS_SERVICE_NAME

          [root root]# cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
           [root root]# chmod 755 /usr/local/bin/restart-aolserver
           [root root]#
        • At this point, these commands will work only for the - root user. Grant permission for the web group to use svc commands on the service0 server.

          [root root]# svgroup web /service/service0
          -[root root]#
        • Verify that the controls work. You may want to tail -f /var/lib/aolserver/service0/log/service0-error.log in another window, so you can see what happens when you type these commands. + root user. Grant permission for the web group to use svc commands on the $OPENACS_SERVICE_NAME server.

          [root root]# svgroup web /service/$OPENACS_SERVICE_NAME
          +[root root]#
        • Verify that the controls work. You may want to tail -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME-error.log in another window, so you can see what happens when you type these commands.

          Most of this information comes from Tom Jackson's AOLserver+Daemontools Mini-HOWTO. -

      Table�6.1.�How it Works

      ProgramInvoked by this program ...... using this fileWhere to find errorsLog goes toUse these commands to control it
      svscanboot - init/etc/inittabps -auxw | grep readproctitlen/a
      aolserversupervise -(a child of svscanboot)/service/service0/run/var/lib/aolserver/service0/log/error.log/var/lib/aolserver/service0/log/service0.logsvc -k /service/service0
      postgresqlRedhat init scripts during boot/etc/init.d/postgresql/usr/local/pgsql/data/server.logservice postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)
      View comments on this page at openacs.org
      +

    Table�6.1.�How it Works

    ProgramInvoked by this program ...... using this fileWhere to find errorsLog goes toUse these commands to control it
    svscanboot + init/etc/inittabps -auxw | grep readproctitlen/a
    aolserversupervise +(a child of svscanboot)/service/$OPENACS_SERVICE_NAME/run/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/error.log/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME.logsvc -k /service/$OPENACS_SERVICE_NAME
    postgresqlRedhat init scripts during boot/etc/init.d/postgresql/usr/local/pgsql/data/server.logservice postgresql start (Red Hat), /etc/init.d/postgresql start (Debian)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-origins.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-origins.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/install-origins.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/install-origins.html 11 Jun 2004 10:17:37 -0000 1.7 @@ -1,4 +1,4 @@ -Where did this document come from?

    Where did this document come from?

    +Where did this document come from?

    Where did this document come from?

    This document was created by Vinod Kurup, but it's really just plagiarism from a number of documents that came before it. If I've used something that you've written without proper credit, let me Index: openacs-4/packages/acs-core-docs/www/install-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-overview.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/install-overview.html 5 May 2004 12:36:04 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/install-overview.html 11 Jun 2004 10:17:37 -0000 1.23 @@ -1,4 +1,4 @@ -Chapter�2.�Installation Overview

    Chapter�2.�Installation Overview

    by Vinod Kurup

    +Chapter�2.�Installation Overview

    Chapter�2.�Installation Overview

    by Vinod Kurup

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-php.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-php.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-php.html 5 May 2004 12:36:04 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-php.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1,4 +1,4 @@ -Install PHP for use in AOLserver

    Install PHP for use in AOLserver

    By Malte Sussdorff

    +Install PHP for use in AOLserver

    Install PHP for use in AOLserver

    By Malte Sussdorff

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    To be able to use PHP software with AOLserver (and OpenACS), you have to install PHP with AOLserver support. Get the latest version from www.php.net. For convenience we get version 4.3.4 from a mirror

    [root root]# cd /usr/local/src
    Index: openacs-4/packages/acs-core-docs/www/install-qmail.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-qmail.html,v
    diff -u -r1.26 -r1.27
    --- openacs-4/packages/acs-core-docs/www/install-qmail.html	5 May 2004 12:36:04 -0000	1.26
    +++ openacs-4/packages/acs-core-docs/www/install-qmail.html	11 Jun 2004 10:17:37 -0000	1.27
    @@ -1,4 +1,4 @@
    -Install qmail (OPTIONAL)

    Install qmail (OPTIONAL)

    Qmail is a Mail Transfer Agent. It handles incoming and +Install qmail (OPTIONAL)

    Install qmail (OPTIONAL)

    Qmail is a Mail Transfer Agent. It handles incoming and outgoing mail. Install qmail if you want your OpenACS server to send and receive mail, and you don't want to use an alternate MTA.

    Red Hat 9: all djb tools (qmail, daemontools, ucspi) will @@ -29,7 +29,7 @@ tcpserver: usage: tcpserver [ -1UXpPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid ] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program [root ucspi-tcp-0.88]# -

    +

    (I'm not sure if this next step is 100% necessary, but when I skip it I get problems. If you get the error 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) then you need to do this.) AOLserver sends outgoing mail via the ns_sendmail command, which pipes a command to the sendmail executable. Or, in our @@ -43,7 +43,7 @@ send outgoing mail.

    [root ucspi-tcp-0.88]# cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
     [root ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
     cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp 
    -tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 
  • Install Qmail.�

    Download qmail, +tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

  • Install Qmail.�

    Download qmail, set up the standard supporting users and build the binaries:

    [root root]# cd /usr/local/src
     [root src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
     [root src]# tar xzf netqmail-1.04.tar.gz
    @@ -102,7 +102,7 @@
     cd netqmail-1.04
     ./collate.sh
     cd netqmail-1.04
    -make setup check

    Replace sendmail with qmail's wrapper.

    [root qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
    +make setup check

    Replace sendmail with qmail's wrapper.

    [root qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
     [root qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
     [root qmail-1.03]#
     rm -f /usr/bin/sendmail /usr/sbin/sendmail
    @@ -124,7 +124,7 @@
     cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root 
     chmod 644 ~alias/.qmail* 
     /var/qmail/bin/maildirmake ~alias/Maildir/ 
    -chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format +chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format (instead of mbox), and install a version of the qmail startup script modified to use Maildir.

    [root alias]# echo "./Maildir" > /var/qmail/bin/.qmail
     [root alias]# cp /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
     [root alias]# chmod 755 /var/qmail/rc
    Index: openacs-4/packages/acs-core-docs/www/install-redhat.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-redhat.html,v
    diff -u -r1.26 -r1.27
    --- openacs-4/packages/acs-core-docs/www/install-redhat.html	5 May 2004 12:36:04 -0000	1.26
    +++ openacs-4/packages/acs-core-docs/www/install-redhat.html	11 Jun 2004 10:17:37 -0000	1.27
    @@ -1,4 +1,4 @@
    -Appendix�A.�Install Red Hat 8/9

    Appendix�A.�Install Red Hat 8/9

    by Joel Aufrecht

    +Appendix�A.�Install Red Hat 8/9

    Appendix�A.�Install Red Hat 8/9

    by Joel Aufrecht

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    This section takes a blank PC and sets up some supporting @@ -26,7 +26,7 @@

    1. Unplug the network cable from your computer. We don't want to connect to the network until we're sure the computer is secure. - + (Wherever you see the word secure, you should always read it as, "secure enough for our purposes, given the amount of work we're @@ -54,7 +54,7 @@ Review (and modify if needed) the partitions created and click Next

    2. On the pop-up window asking "Are you sure you want to do this?" click Yes - IF YOU ARE WIPING YOUR HARD DRIVE.

    3. Click Next on the boot loader screen

  • Configure Networking. + IF YOU ARE WIPING YOUR HARD DRIVE.

  • Click Next on the boot loader screen

  • Configure Networking. Again, if you know what you're doing, do this step yourself, being sure to note the firewall holes. Otherwise, follow the instructions in this step to set up a computer directly connected to the internet with a dedicated IP address.

    1. DHCP is a system by which a computer that @@ -75,7 +75,7 @@ Mail (SMTP). In the Other ports box, enter 443, 8000, 8443. Click Next. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the +Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the computer to support and then click Next

  • Choose your time zone and click Next.

  • Type in a root password, twice.

  • On the Package selection page, we're going to @@ -87,13 +87,13 @@ risk that's still screened by the firewall, or a resource hog. Just don't install a database or web server, because that would conflict with the database and web server we'll install later. -

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. +

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. The same rules apply as in the last step - you can add more stuff, but you shouldn't remove anything the guide adds. We're going to go through all the packages in one big list, so select Flat View and wait. In a minute, a -list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    check ImageMagick (required for the photo-album packages,
    uncheckisdn4k-utils (unless you are using isdn, this installs a useless daemon),
    check mutt (a mail program that reads Maildir),
    uncheck nfs-utils (nfs is a major security risk),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination +list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    check ImageMagick (required for the photo-album packages,
    uncheckisdn4k-utils (unless you are using isdn, this installs a useless daemon),
    check mutt (a mail program that reads Maildir),
    uncheck nfs-utils (nfs is a major security risk),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination of packages we've selected, and wants to satisfy some dependencies. Don't let it. On the next screen, choose Ignore Package @@ -119,7 +119,7 @@ upgrading all of that. Since you are upgrading the kernel, reboot after this step.

  • Lock down SSH

    1. - + SSH is the protocol we use to connect securely to the computer (replacing telnet, which is insecure). sshd is the daemon that listens for incoming Index: openacs-4/packages/acs-core-docs/www/install-resources.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-resources.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/install-resources.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/install-resources.html 11 Jun 2004 10:17:37 -0000 1.7 @@ -1,4 +1,4 @@ -Resources

      Resources

      +Resources

      Resources

      Here are some resources that OpenACS users have found useful.

      Books

      • Index: openacs-4/packages/acs-core-docs/www/install-squirrelmail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-squirrelmail.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/install-squirrelmail.html 5 May 2004 12:36:04 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/install-squirrelmail.html 11 Jun 2004 10:17:37 -0000 1.6 @@ -1,10 +1,10 @@ -Install Squirrelmail for use as a webmail system for OpenACS

        Install Squirrelmail for use as a webmail system for OpenACS

        By Malte Sussdorff

        +Install Squirrelmail for use as a webmail system for OpenACS

        Install Squirrelmail for use as a webmail system for OpenACS

        By Malte Sussdorff

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        This section is work in progress. It will detail how you can install Squirrelmail as a webmail frontend for OpenACS, thereby neglecting the need to have a seperate webmail package within OpenACS

        [service0 service0]# cd www
        -[service0 www]# wget http://cesnet.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.2.tar.gz
        -[service0 www]# tar xfz squirrelmail-1.4.2.tar.gz
        -[service0 www]# mv squirrelmail-1.4.2 mail
        -[service0 www]# cd mail/config
        -[service0 www]# ./conf.pl
        +        

        This section is work in progress. It will detail how you can install Squirrelmail as a webmail frontend for OpenACS, thereby neglecting the need to have a seperate webmail package within OpenACS

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]# cd www
        +[$OPENACS_SERVICE_NAME www]# wget http://cesnet.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.2.tar.gz
        +[$OPENACS_SERVICE_NAME www]# tar xfz squirrelmail-1.4.2.tar.gz
        +[$OPENACS_SERVICE_NAME www]# mv squirrelmail-1.4.2 mail
        +[$OPENACS_SERVICE_NAME www]# cd mail/config
        +[$OPENACS_SERVICE_NAME www]# ./conf.pl
               

        Now you are about to configure Squirrelmail. The configuration heavily depends on your setup, so no instructions are given here.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/install-ssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-ssl.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-ssl.html 5 May 2004 12:36:04 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-ssl.html 11 Jun 2004 10:17:37 -0000 1.5 @@ -1,21 +1,21 @@ -Installing SSL Support for an OpenACS service

        Installing SSL Support for an OpenACS service

        Debian Users: apt-get install openssl before proceeding.

        1. Make sure nsopenssl.so is installed for AOLserver.

        2. Uncomment this line from config.tcl.

          #ns_param   nsopenssl       ${bindir}/nsopenssl.so
          -
        3. Prepare a certificate directory for the service.

          [service0 etc]$ mkdir /var/lib/aolserver/service0/etc/certs
          -[service0 etc]$ chmod 700 /var/lib/aolserver/service0/etc/certs
          -[service0 etc]$ 
          -mkdir /var/lib/aolserver/service0/etc/certs
          -chmod 700 /var/lib/aolserver/service0/etc/certs
        4. It takes two files to support an SSL connection. The certificate is the public half of the key pair - the server sends the certificate to browser requesting ssl. The key is the private half of the key pair. In addition, the certificate must be signed by Certificate Authority or browsers will protest. Each web browser ships with a built-in list of acceptable Certificate Authorities (CAs) and their keys. Only a site certificate signed by a known and approved CA will work smoothly. Any other certificate will cause browsers to produce some messages or block the site. Unfortunately, getting a site certificate signed by a CA costs money. In this section, we'll generate an unsigned certificate which will work in most browsers, albeit with pop-up messages.

          Use an OpenSSL perl script to generate a certificate and key.

          [service0 service0]$ cd /var/lib/aolserver/service0/etc/certs
          -[service0 certs]$ perl /usr/share/ssl/misc/CA -newcert
          +Installing SSL Support for an OpenACS service

          Installing SSL Support for an OpenACS service

          Debian Users: apt-get install openssl before proceeding.

          1. Make sure nsopenssl.so is installed for AOLserver.

          2. Uncomment this line from config.tcl.

            #ns_param   nsopenssl       ${bindir}/nsopenssl.so
            +
          3. Prepare a certificate directory for the service.

            [$OPENACS_SERVICE_NAME etc]$ mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
            +[$OPENACS_SERVICE_NAME etc]$ chmod 700 /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
            +[$OPENACS_SERVICE_NAME etc]$ 
            +mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
            +chmod 700 /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
          4. It takes two files to support an SSL connection. The certificate is the public half of the key pair - the server sends the certificate to browser requesting ssl. The key is the private half of the key pair. In addition, the certificate must be signed by Certificate Authority or browsers will protest. Each web browser ships with a built-in list of acceptable Certificate Authorities (CAs) and their keys. Only a site certificate signed by a known and approved CA will work smoothly. Any other certificate will cause browsers to produce some messages or block the site. Unfortunately, getting a site certificate signed by a CA costs money. In this section, we'll generate an unsigned certificate which will work in most browsers, albeit with pop-up messages.

            Use an OpenSSL perl script to generate a certificate and key.

            [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/certs
            +[$OPENACS_SERVICE_NAME certs]$ perl /usr/share/ssl/misc/CA -newcert
             Using configuration from /usr/share/ssl/openssl.cnf
             Generating a 1024 bit RSA private key
             ...++++++
             .......++++++
             writing new private key to 'newreq.pem'
             Enter PEM pass phrase:

            Enter a pass phrase for the CA certificate. Then, answer the rest of the questions. At the end you should see this:

            Certificate (and private key) is in newreq.pem
            -[service0 certs]$

            newreq.pem contains our certificate and private key. The key is protected by a passphrase, which means that we'll have to enter the pass phrase each time the server starts. This is impractical and unnecessary, so we create an unprotected version of the key. Security implication: if anyone gets access to the file keyfile.pem, they effectively own the key as much as you do. Mitigation: don't use this key/cert combo for anything besides providing ssl for the web site.

            [root misc]# openssl rsa -in newreq.pem -out keyfile.pem
            +[$OPENACS_SERVICE_NAME certs]$

            newreq.pem contains our certificate and private key. The key is protected by a passphrase, which means that we'll have to enter the pass phrase each time the server starts. This is impractical and unnecessary, so we create an unprotected version of the key. Security implication: if anyone gets access to the file keyfile.pem, they effectively own the key as much as you do. Mitigation: don't use this key/cert combo for anything besides providing ssl for the web site.

            [root misc]# openssl rsa -in newreq.pem -out keyfile.pem
             read RSA key
             Enter PEM pass phrase:
             writing RSA key
            -[service0 certs]$ 

            To create the certificate file, we take the combined file, copy it, and strip out the key.

            [service0 certs]$ cp newreq.pem certfile.pem
            +[$OPENACS_SERVICE_NAME certs]$ 

            To create the certificate file, we take the combined file, copy it, and strip out the key.

            [$OPENACS_SERVICE_NAME certs]$ cp newreq.pem certfile.pem
             [root misc]# emacs certfile.pem

            Strip out the section that looks like

            -----BEGIN RSA PRIVATE KEY-----
             Proc-Type: 4,ENCRYPTED
             DEK-Info: DES-EDE3-CBC,F3EDE7CA1B404997
            Index: openacs-4/packages/acs-core-docs/www/install-steps.html
            ===================================================================
            RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-steps.html,v
            diff -u -r1.19 -r1.20
            --- openacs-4/packages/acs-core-docs/www/install-steps.html	5 May 2004 12:36:04 -0000	1.19
            +++ openacs-4/packages/acs-core-docs/www/install-steps.html	11 Jun 2004 10:17:37 -0000	1.20
            @@ -1,6 +1,6 @@
            -Basic Steps

            Basic Steps

            +Basic Steps

            Basic Steps

            The basic steps for getting OpenACS installed are: -

            1. Install an OS and supporting software (see Install a Unix-like OS or Appendix�A, Install Red Hat 8/9 for more details). See the Table�2.2, “Version Compatibility Matrix”.

            2. Install a database (see Install Oracle or +

              1. Install an OS and supporting software (see Install a Unix-like OS or Appendix�A, Install Red Hat 8/9 for more details). See the Table�2.2, “Version Compatibility Matrix”.

              2. Install a database (see the section called “Install Oracle 8.1.7” or Install PostgreSQL).

              3. Install AOLserver (Install AOLserver 4) .

              4. Create a unique database and system user. Install the OpenACS tarball, start and AOLserver instance, and use the OpenACS web pages to complete installation @@ -27,19 +27,19 @@ }

          5. This is text that you will see and type in a command shell, including text you may have to change. It is followed by a list of just the commands, - which you can copy and paste. The command prompt varies by system; in the examples we use the form[service0 aolserver]$, where service0 is the current user and aolserver is the current directory. The root prompt is shown ending in # and all other prompts in $.

            -[root root]# su - service0
            -[service0 aolserver]$ svc -d /service/service0
            -[service0 aolserver]$ dropdb service0
            +          which you can copy and paste. The command prompt varies by system; in the examples we use the form[$OPENACS_SERVICE_NAME aolserver]$, where $OPENACS_SERVICE_NAME is the current user and aolserver is the current directory.  The root prompt is shown ending in # and all other prompts in $.

            +[root root]# su - $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME aolserver]$ svc -d /service/$OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME aolserver]$ dropdb $OPENACS_SERVICE_NAME
             DROP DATABASE
            -[service0 aolserver]$ createdb service0
            +[$OPENACS_SERVICE_NAME aolserver]$ createdb $OPENACS_SERVICE_NAME
             CREATE DATABASE
            -su - service0
            -svc -d /service/service0
            -dropdb service0
            -createdb service0

      Paths and Users

      Table�2.1.�Default directories for a standard install

      Fully qualified domain name of your serveryourserver.test
      name of administrative access accountremadmin
      OpenACS serviceservice0
      OpenACS service accountservice0
      OpenACS database nameservice0
      Root of OpenACS service file tree (SERVERROOT)/var/lib/aolserver/service0
      Location of source code tarballs for new software/tmp
      The OpenACS tarball contains some files which +su - $OPENACS_SERVICE_NAME +svc -d /service/$OPENACS_SERVICE_NAME +dropdb $OPENACS_SERVICE_NAME +createdb $OPENACS_SERVICE_NAME

      Setting a global shell variable for cut and paste.�In order to cut and paste the instructions into your shell, you must set the environment variable $OPENACS_SERVICE_NAME. In order to set it globally so that it works for any new users or special service users you may create, edit the file /etc/profile and add this line:

      export OPENACS_SERVICE_NAME=service0

      Paths and Users

      Table�2.1.�Default directories for a standard install

      Fully qualified domain name of your serveryourserver.test
      name of administrative access accountremadmin
      OpenACS service$OPENACS_SERVICE_NAME (set to service0 in default install)
      OpenACS service account$OPENACS_SERVICE_NAME
      OpenACS database name$OPENACS_SERVICE_NAME
      Root of OpenACS service file tree (SERVERROOT)/var/lib/aolserver/$OPENACS_SERVICE_NAME
      Location of source code tarballs for new software/tmp
      The OpenACS tarball contains some files which are useful while setting up other software. Those - files are located at:/tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files
      Database backup directory/var/lib/aolserver/service0/database-backup
      Service config files/var/lib/aolserver/service0/etc
      Service log files/var/lib/aolserver/service0/log
      Compile directory/usr/local/src
      PostgreSQL directory/usr/local/pgsql
      AOLserver directory/usr/local/aolserver

      + files are located at:

      /tmp/openacs-5.2.0d1/packages/acs-core-docs/www/files
      Database backup directory/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
      Service config files/var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
      Service log files/var/lib/aolserver/$OPENACS_SERVICE_NAME/log
      Compile directory/usr/local/src
      PostgreSQL directory/usr/local/pgsql
      AOLserver directory/usr/local/aolserver

      None of these locations are set in stone - they're simply the values that we've chosen. The values that you'll probably want to change, such as service name, are Index: openacs-4/packages/acs-core-docs/www/install-tclwebtest.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-tclwebtest.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 5 May 2004 12:36:04 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 11 Jun 2004 10:17:38 -0000 1.10 @@ -1,4 +1,4 @@ -Install tclwebtest.

      Install tclwebtest.

      Download the tclwebtest +Install tclwebtest.

      Install tclwebtest.

      Download the tclwebtest source, unpack it, and put it an appropriate place. (tclwebtest 1.0 will be required for auto-tests in OpenACS 5.1. When it exists, the cvs command here will be replaced with http://prdownloads.sourceforge.net/tclwebtest/tclwebtest-0.3.tar.gz?download.) As root:

      cd /tmp
       cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/tclwebtest co tclwebtest
      Index: openacs-4/packages/acs-core-docs/www/ix01.html
      ===================================================================
      RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ix01.html,v
      diff -u -r1.14 -r1.15
      --- openacs-4/packages/acs-core-docs/www/ix01.html	5 May 2004 12:36:04 -0000	1.14
      +++ openacs-4/packages/acs-core-docs/www/ix01.html	11 Jun 2004 10:17:38 -0000	1.15
      @@ -1,2 +1,2 @@
      -Index

      Index

      C

      computeroutput
      code, Code
      cvs
      initializing, Initialize CVS (OPTIONAL)
      setup, Using CVS with an OpenACS Site

      D

      daemontools
      installation, Install Daemontools (OPTIONAL)
      docbook
      installation, Install Red Hat 8/9
      DocBook
      DTD, Why DocBook?
      emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
      Document structure, Document Structure

      E

      emacs
      installation, Install Red Hat 8/9
      emphasis
      bold, italics, Emphasis

      G

      Graphics
      Images, Graphics

      I

      informaltable
      table, Tables

      L

      language
      installation, Install Red Hat 8/9
      Linking, Links
      lists, Lists

      O

      OpenACS Package, What a Package Looks Like

      P

      photo-album
      installation (see ImageMagick)
      Postgres
      Vacuuming, Installation Option 2: Install from tarball

      Q

      qmail
      installation, Install qmail (OPTIONAL)
      Maildir, Install qmail (OPTIONAL)
      rcpthosts error message, Install qmail (OPTIONAL)

      T

      The publish point for new packages should be +Index

      Index

      Symbols

      $OPENACS_SERVICE_NAME, Paths and Users

      C

      computeroutput
      code, Code
      cvs
      initializing, Initialize CVS (OPTIONAL)
      setup, Using CVS with an OpenACS Site

      D

      daemontools
      installation, Install Daemontools (OPTIONAL)
      docbook
      installation, Install Red Hat 8/9
      DocBook
      DTD, Why DocBook?
      emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
      Document structure, Document Structure

      E

      emacs
      installation, Install Red Hat 8/9
      emphasis
      bold, italics, Emphasis

      G

      Graphics
      Images, Graphics

      I

      informaltable
      table, Tables

      L

      language
      installation, Install Red Hat 8/9
      Linking, Links
      lists, Lists

      O

      OpenACS Package, What a Package Looks Like

      P

      photo-album
      installation (see ImageMagick)
      Postgres
      Vacuuming, Installation Option 2: Install from tarball

      Q

      qmail
      installation, Install qmail (OPTIONAL)
      Maildir, Install qmail (OPTIONAL)
      rcpthosts error message, Install qmail (OPTIONAL)

      T

      The publish point for new packages should be fixed., Prepare the package for distribution.

      U

      ulink, Links
      Unicode
      in PostgreSQL, Install PostgreSQL
      upgrade
      OpenACS 4.5 to 4.6.x
      Linux/Unix, Upgrading 4.5 or higher to 4.6.3

      X

      XML guidelines, Why DocBook?
      xref
      linkend, Links
      xreflabel, Headlines, Sections
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/kernel-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-doc.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 5 May 2004 12:36:04 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 11 Jun 2004 10:17:38 -0000 1.26 @@ -1 +1 @@ -Chapter�15.�Kernel Documentation
      View comments on this page at openacs.org
      +Chapter�15.�Kernel Documentation
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/kernel-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-overview.html,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 5 May 2004 12:36:04 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 11 Jun 2004 10:17:38 -0000 1.20 @@ -1,4 +1,4 @@ -Overview

      Overview

      • +Overview

        Overview

        • The OpenACS Kernel, which handles system-wide necessities such as metadata, security, users and groups, subsites, and package Index: openacs-4/packages/acs-core-docs/www/mac-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/mac-installation.html,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-core-docs/www/mac-installation.html 5 May 2004 12:36:04 -0000 1.29 +++ openacs-4/packages/acs-core-docs/www/mac-installation.html 11 Jun 2004 10:17:38 -0000 1.30 @@ -1,4 +1,4 @@ -OpenACS Installation Guide for Mac OS X

          OpenACS Installation Guide for Mac OS X

          Prerequisites.�Install readline:

          1. Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src

          2. Extract readline in /usr/local/src, configure, compile, and install:

            su - root
            +OpenACS Installation Guide for Mac OS X

            OpenACS Installation Guide for Mac OS X

            Prerequisites.�Install readline:

            1. Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src

            2. Extract readline in /usr/local/src, configure, compile, and install:

              su - root
               cd /usr/local/src
               tar xvfz readline-4.3.tar.gz
               readline-4.3
              Index: openacs-4/packages/acs-core-docs/www/maint-performance.html
              ===================================================================
              RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maint-performance.html,v
              diff -u -r1.14 -r1.15
              --- openacs-4/packages/acs-core-docs/www/maint-performance.html	5 May 2004 12:36:04 -0000	1.14
              +++ openacs-4/packages/acs-core-docs/www/maint-performance.html	11 Jun 2004 10:17:38 -0000	1.15
              @@ -1,7 +1,7 @@
              -Diagnosing Performance Problems

              Diagnosing Performance Problems

              • Did performance problems happen overnight, or did they sneak up on +Diagnosing Performance Problems

                Diagnosing Performance Problems

                • Did performance problems happen overnight, or did they sneak up on you? Any clue what caused the performance problems (e.g. loading 20K users into .LRN)

                • Is the file system out of space? Is the machine swapping to disk constantly?

                • Isolating and solving database problems.

                  • Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see the section called “Vacuum Postgres nightly”. For Oracle, use exec dbms_stats.gather_schema_stats('SCHEMA_NAME') (Andrew Piskorski's Oracle notes).

                  • You can track the exact amount of time each database query on a page takes:

                    1. Go to Main Site : Site-Wide Administration : Install Software

                    2. Click on "Install New Application" in "Install from OpenACS Repository"

                    3. Choose "ACS Developer Support">

                    4. After install is complete, restart the server.

                    5. Browse to Developer Support, which is automatically mounted at /ds. -

                    6. Turn on Database statistics

                    7. Browse directly to a slow page and click "Request Information" at the bottom of the page.

                    8. This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

                      Figure�6.8.�Query Analysis example

                      Query Analysis example
                  • Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

                    Log in to SQL*Plus as the admin:

                    [service0 ~]$ svrmgrl
                    +              

                  • Turn on Database statistics

                  • Browse directly to a slow page and click "Request Information" at the bottom of the page.

                  • This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

                    Figure�6.8.�Query Analysis example

                    Query Analysis example
          3. Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

            Log in to SQL*Plus as the admin:

            [$OPENACS_SERVICE_NAME ~]$ svrmgrl
             
             Oracle Server Manager Release 3.1.7.0.0 - Production
             
            @@ -26,4 +26,29 @@
              where sql.address    = s.sql_address
                and sql.hash_value = s.sql_hash_value
              --and upper(s.username) like 'USERNAME%'
            - order by s.username ,s.sid ,s.serial# ,sql.piece ;

            To kill a troubled process:

            alter system kill session 'SID,SERIAL#';  --substitute values for SID and SERIAL#

            (See Andrew Piskorski's Oracle notes)

      View comments on this page at openacs.org
      + order by s.username ,s.sid ,s.serial# ,sql.piece ;

      To kill a troubled process:

      alter system kill session 'SID,SERIAL#';  --substitute values for SID and SERIAL#

      (See Andrew Piskorski's Oracle notes)

  • Creating an appropriate tuning and monitoring environment

    + The first task is to create an appropriate environment for finding out + what is going on inside Oracle. Oracle provides Statspack, a package to + monitor and save the state of the v$ performance views. These reports + help finding severe problems by exposing summary data about the Oracle + wait interface, executed queries. You'll find the installation + instructions in $ORACLE_HOME/rdbms/admin/spdoc.txt. Follow the + instructions carefully and take periodic snapshots, this way you'll be + able to look at historical performance data. +

    + Also turn on the timed_statistics in your init.ora file, so that + Statspack reports (and all other Oracle reports) are timed, which makes + them a lot more meaningful. The overhead of timing data is about 1% per + Oracle Support information. +

    + To be able to get a overview of how Oracle executes a particular query, + install "autotrace". I usually follow the instructions here http://asktom.oracle.com/~tkyte/article1/autotrace.html. +

    Make sure, that the Oracle CBO works with adequate statistics

    + The Oracle Cost Based optimizer is a piece of software that tries to find + the "optimal" execution plan for a given SQL statement. For that it + estimates the costs of running a SQL query in a particular way (by default + up to 80.000 permutations are being tested in a Oracle 8i). To get an + adequate cost estimate, the CBO needs to have adequate statistics. For + that Oracle supplies the dbms_stats + package. +

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/maintenance-deploy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-deploy.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 5 May 2004 12:36:04 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 11 Jun 2004 10:17:38 -0000 1.10 @@ -1,7 +1,7 @@ -Staged Deployment for Production Networks

    Staged Deployment for Production Networks

    By Joel Aufrecht

    +Staged Deployment for Production Networks

    Staged Deployment for Production Networks

    By Joel Aufrecht

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

    This section describes minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

    • Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.

    • Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.

    Deployment with CVS

    With this method, we control the files on a site via CVS. In this example, there is one development site and one production site. The only way files should move between the two is via cvs. The production site could run "HEAD" from cvs (raw example from chat log:)

    +        

    This section describes minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

    • Control: You know for sure that the change you are making is the change that you intend to make and is the change that you tested.

    • Rollback: If anything goes wrong, you can return to the previous working configuration safely and quickly.

    Deployment with CVS

    With this method, we control the files on a site via CVS. In this example, there is one development site and one production site. The only way files should move between the two is via cvs. The production site could run "HEAD" from cvs (raw example from chat log:)

     1) change the file on dev as desired
     2) test the new file
     3) commit the file: 
    @@ -17,4 +17,4 @@
     the stuff in -m "foo" is a comment visible only from within cvs commands
     4) update the file on production:
     cd /web/foo-prod/www
    -cvs up index.adp

    The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

    A/B Deployment

    The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

    This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

    Simple A/B Deployment: Database is not changed

    Figure�6.2.�Simple A/B Deployment - Step 1

    Simple A/B Deployment - Step 1

    Figure�6.3.�Simple A/B Deployment - Step 2

    Simple A/B Deployment - Step 2

    Figure�6.4.�Simple A/B Deployment - Step 3

    Simple A/B Deployment - Step 3

    Complex A/B Deployment: Database is changed

    Figure�6.5.�Complex A/B Deployment - Step 1

    Complex A/B Deployment - Step 1

    Figure�6.6.�Complex A/B Deployment - Step 2

    Complex A/B Deployment - Step 2

    Figure�6.7.�Complex A/B Deployment - Step 3

    Complex A/B Deployment - Step 3
    View comments on this page at openacs.org
    +cvs up index.adp

    The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

    A/B Deployment

    The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

    This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

    Simple A/B Deployment: Database is not changed

    Figure�6.2.�Simple A/B Deployment - Step 1

    Simple A/B Deployment - Step 1

    Figure�6.3.�Simple A/B Deployment - Step 2

    Simple A/B Deployment - Step 2

    Figure�6.4.�Simple A/B Deployment - Step 3

    Simple A/B Deployment - Step 3

    Complex A/B Deployment: Database is changed

    Figure�6.5.�Complex A/B Deployment - Step 1

    Complex A/B Deployment - Step 1

    Figure�6.6.�Complex A/B Deployment - Step 2

    Complex A/B Deployment - Step 2

    Figure�6.7.�Complex A/B Deployment - Step 3

    Complex A/B Deployment - Step 3
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/maintenance-web.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-web.html,v diff -u -r1.27 -r1.28 --- openacs-4/packages/acs-core-docs/www/maintenance-web.html 5 May 2004 12:36:04 -0000 1.27 +++ openacs-4/packages/acs-core-docs/www/maintenance-web.html 11 Jun 2004 10:17:38 -0000 1.28 @@ -1,4 +1,4 @@ -Chapter�6.�Production Environments

    Chapter�6.�Production Environments

    By Joel Aufrecht

    +Chapter�6.�Production Environments

    Chapter�6.�Production Environments

    By Joel Aufrecht

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Maintenance tasks, optional software, and alternate configurations for AOLserver.

    ($Id$)
    View comments on this page at openacs.org
    Fisheye: Tag 1.14 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/maintenance.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/nxml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/nxml-mode.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/nxml-mode.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/nxml-mode.html 11 Jun 2004 10:17:38 -0000 1.7 @@ -1,4 +1,4 @@ -Using nXML mode in Emacs

    Using nXML mode in Emacs

    By Jeff Davis

    +Using nXML mode in Emacs

    Using nXML mode in Emacs

    By Jeff Davis

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Index: openacs-4/packages/acs-core-docs/www/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/object-identity.html 5 May 2004 12:36:04 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -Object Identity

    Object Identity

    By Rafael H. Schloming

    +Object Identity

    Object Identity

    By Rafael H. Schloming

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    One of the major design features of OpenACS 5.2.0d1 is the explicit representation Index: openacs-4/packages/acs-core-docs/www/object-system-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-design.html,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 5 May 2004 12:36:04 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 11 Jun 2004 10:17:38 -0000 1.24 @@ -1,4 +1,4 @@ -Object Model Design

    Object Model Design

    By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

    +Object Model Design

    Object Model Design

    By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Essentials

    Data Model

    • Index: openacs-4/packages/acs-core-docs/www/object-system-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-requirements.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 5 May 2004 12:36:04 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 11 Jun 2004 10:17:38 -0000 1.23 @@ -1,4 +1,4 @@ -Object Model Requirements

      Object Model Requirements

      By Pete Su

      +Object Model Requirements

      Object Model Requirements

      By Pete Su

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      I. Introduction

      A major goal in OpenACS 4 is to unify and normalize many of the core services Index: openacs-4/packages/acs-core-docs/www/objects.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/objects.html,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-core-docs/www/objects.html 5 May 2004 12:36:04 -0000 1.36 +++ openacs-4/packages/acs-core-docs/www/objects.html 11 Jun 2004 10:17:38 -0000 1.37 @@ -1,4 +1,4 @@ -OpenACS Data Models and the Object System

      OpenACS Data Models and the Object System

      By Pete Su

      +OpenACS Data Models and the Object System

      OpenACS Data Models and the Object System

      By Pete Su

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      Overview

      @@ -78,7 +78,7 @@ Fire up your text editor and open the ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created when we created the package. Then, do the following: -

      Describe the new type to the type system

      +

      Describe the new type to the type system

      First, add an entry to the acs_object_types table with the following PL/SQL call:

       begin  
      @@ -138,7 +138,7 @@
       because the new type note is a subtype of
       acs_object, it will inherit these attributes, so there is
       no need for us to define them.
      -

      Define a table in which to store your objects

      +

      Define a table in which to store your objects

      The next thing we do is make a small modification to the data model to reflect the fact that each row in the notes table represents something that is not only an object of type @@ -163,7 +163,7 @@ use the acs_objects table to find objects will transparently find any objects that are instances of any subtype of acs_objects. -

      Define a package for type specific procedures

      +

      Define a package for type specific procedures

      The next step is to define a PL/SQL package for your new type, and write some basic procedures to create and delete objects. Here is a package definition for our new type: @@ -211,7 +211,7 @@ object OBJ was "read only", then any other object that used OBJ as its context would also be "read only" by default. We'll talk about this more later. -

      Define a package body for type specific procedures

      +

      Define a package body for type specific procedures

      The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use acs_object.new to insert a row into Index: openacs-4/packages/acs-core-docs/www/openacs-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-overview.html,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 5 May 2004 12:36:04 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 11 Jun 2004 10:17:38 -0000 1.19 @@ -1,4 +1,4 @@ -Overview

      Overview

      +Overview

      Overview

      OpenACS (Open Architecture Community System) is an advanced toolkit for building scalable, community-oriented web applications. If you're thinking of building an Index: openacs-4/packages/acs-core-docs/www/openacs-unpack.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-unpack.html,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/openacs-unpack.html 5 May 2004 12:36:04 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/openacs-unpack.html 11 Jun 2004 10:17:38 -0000 1.18 @@ -1,4 +1,4 @@ -Unpack the OpenACS tarball

      Unpack the OpenACS tarball

      The OpenACS tarball contains sample configuration files +Unpack the OpenACS tarball

      Unpack the OpenACS tarball

      The OpenACS tarball contains sample configuration files for some of the packages listed below. In order to access those files, unpack the tarball now.

      [root root]# cd /tmp
       [root tmp]# tar xzf openacs-5.2.0d1.tgz
      Index: openacs-4/packages/acs-core-docs/www/openacs.html
      ===================================================================
      RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v
      diff -u -r1.35 -r1.36
      --- openacs-4/packages/acs-core-docs/www/openacs.html	5 May 2004 12:36:04 -0000	1.35
      +++ openacs-4/packages/acs-core-docs/www/openacs.html	11 Jun 2004 10:17:38 -0000	1.36
      @@ -1,4 +1,4 @@
      -Install OpenACS 5.2.0d1

      Install OpenACS 5.2.0d1

      by Vinod Kurup

      +Install OpenACS 5.2.0d1

      Install OpenACS 5.2.0d1

      by Vinod Kurup

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      Set up the file system for one or more OpenACS Sites

      For Linux Standard Base compliance and ease of backup, @@ -25,39 +25,39 @@ for each different service. A service name should be a single word, letters and numbers only. If the name of your site is one word, that would be a good choice. For - example "service0" might be the service name for the - service0.net + example "$OPENACS_SERVICE_NAME" might be the service name for the + $OPENACS_SERVICE_NAME.net community.

      We'll leave the password blank, which prevents login by password, for increased security. The only way to log in will be with ssh certificates. The only people who should log in are developers for that specific instance. Add this user, and put - it in the service0 group so that it + it in the $OPENACS_SERVICE_NAME group so that it can use database and server commands associated with that group.

      -[root root]# useradd service0
      +[root root]# useradd $OPENACS_SERVICE_NAME
       [root root]#

      Installation Option 1: Use automated script

      A bash script is available to automate all of the steps for the rest of this section. It requires tclwebtest. The automated script can greatly accelerate the install process, but is very sensitive to the install environment. We recommend that you run the automated install and, if it does not work the first time, consider switching to a manual installation.

      Get the install script from CVS. It is located within the main cvs tree, at /etc/install. Use anonymous CVS checkout to get that directory in the home directory of the service's dedicated user. We put it there so that it is not overwritten when we do the main CVS checkout to the target - location.

      [root root]# su - service0
      -[service0 service0]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot co -d install openacs-4/etc/install
      +        location.

      [root root]# su - $OPENACS_SERVICE_NAME
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot co -d install openacs-4/etc/install
       cvs server: Updating install
       U install/README
       U install/TODO
         ... many lines omitted ...
       U install/tcl/twt-procs.tcl
       U install/tcl/user-procs.tcl
      -[service0 service0]$ cd install
      -[service0 install]$ emacs install.tcl
      -

      Edit the installation configuration file, /home/service0/install/install.tcl and update the site-specific values, such as the new service's IP address and name, which will be written into the new service's config.tcl file. If your system is different from the one described in the previous sections, check the file paths as well. Set do_checkout=yes to create a new OpenACS site directly from a CVS checkout, or =no if you have a fully configured site and just want to rebuild it (drop and recreate the database and repeat the installation). If you have followed a stock installation, the default configuration will work without changes and will install an OpenACS site at 127.0.0.1:8000.

      Run the install script install.sh as root:

      [service0 service0]$ exit 
      -[root root]# sh /home/service0/install/install.sh
      -/home/service0/install/install.sh: Starting installation with config_file 
      -/home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/
      -service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes, 
      +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd install
      +[$OPENACS_SERVICE_NAME install]$ emacs install.tcl
      +

      Edit the installation configuration file, /home/$OPENACS_SERVICE_NAME/install/install.tcl and update the site-specific values, such as the new service's IP address and name, which will be written into the new service's config.tcl file. If your system is different from the one described in the previous sections, check the file paths as well. Set do_checkout=yes to create a new OpenACS site directly from a CVS checkout, or =no if you have a fully configured site and just want to rebuild it (drop and recreate the database and repeat the installation). If you have followed a stock installation, the default configuration will work without changes and will install an OpenACS site at 127.0.0.1:8000.

      Run the install script install.sh as root:

      [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit 
      +[root root]# sh /home/$OPENACS_SERVICE_NAME/install/install.sh
      +/home/$OPENACS_SERVICE_NAME/install/install.sh: Starting installation with config_file 
      +/home/$OPENACS_SERVICE_NAME/install/install.tcl. Using serverroot=/var/lib/aolserver/
      +$OPENACS_SERVICE_NAME, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes, 
       dotlrn=no, and database=postgres., use_daemontools=true
         ... many lines omitted ...
      -Tue Jan 27 11:50:59 CET 2004: Finished (re)installing /var/lib/aolserver/service0.
      +Tue Jan 27 11:50:59 CET 2004: Finished (re)installing /var/lib/aolserver/$OPENACS_SERVICE_NAME.
       ######################################################################
         New site URL: http://127.0.0.1:8000
       admin email   : admin@yourserver.net
      @@ -67,42 +67,42 @@
             to the /tmp directory.  If
             not, download the OpenACS
             tarball and save it in
      -      /tmp and proceed:

      1. Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.

        [root root]# su - service0
        -[service0 service0]$ cd /var/lib/aolserver
        -[service0 aolserver]$ tar xzf /tmp/openacs-5.2.0d1.tgz
        -[service0 aolserver]$ mv openacs-5.2.0d1 service0
        -[service0 aolserver]$ chmod -R 775 service0
        -[service0 aolserver]$ chown -R service0.service0 service0
        -[service0 aolserver]$ ls -al
        +      /tmp and proceed:

        1. Unpack the OpenACS tarball and rename it to $OPENACS_SERVICE_NAME. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.

          [root root]# su - $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
          +[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /tmp/openacs-5.2.0d1.tgz
          +[$OPENACS_SERVICE_NAME aolserver]$ mv openacs-5.2.0d1 $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME aolserver]$ ls -al
           total 3
           drwxrwx---    3 root     web          1024 Mar 29 16:41 .
           drwxr-xr-x   25 root     root         1024 Mar 29 16:24 ..
          -drwx------    7 service0 web          1024 Jan  6 14:36 service0
          -[service0 aolserver]$ exit
          +drwx------    7 $OPENACS_SERVICE_NAME web          1024 Jan  6 14:36 $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME aolserver]$ exit
           logout
           [root root]#
          -su - service0
          +su - $OPENACS_SERVICE_NAME
           cd /var/lib/aolserver
           tar xzf /tmp/openacs-5.2.0d1.tgz
          -mv openacs-5.2.0d1 service0
          -chmod -R 755 service0
          -chgrp -R service0.service0 service0
          +mv openacs-5.2.0d1 $OPENACS_SERVICE_NAME
          +chmod -R 755 $OPENACS_SERVICE_NAME
          +chgrp -R $OPENACS_SERVICE_NAME.$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME
           exit
        2. Add the Service to CVS (OPTIONAL)

        3. Prepare the database

          • Prepare Oracle for OpenACS.�If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service

            You should be sure that your user account - (e.g. service0) is in the + (e.g. $OPENACS_SERVICE_NAME) is in the dba group.

            1. Verify membership by typing groups when you login: -

              [service0 ~]$ groups
              +		  

              [$OPENACS_SERVICE_NAME ~]$ groups
               dba web

              If you do not see these groups, take the following action: -

              [service0 ~]$ su -
              +		  

              [$OPENACS_SERVICE_NAME ~]$ su -
               Password: ************
              -[root ~]# adduser service0 dba

              +[root ~]# adduser $OPENACS_SERVICE_NAME dba

              If you get an error about an undefined group, then add that group manually: @@ -117,7 +117,7 @@ Connect to Oracle using svrmgrl and login: -

              [service0 ~]$ svrmgrl
              +		  

              [$OPENACS_SERVICE_NAME ~]$ svrmgrl
               SVRMGR> connect internal
               Connected.

            2. @@ -151,13 +151,13 @@ exit from svrmgrl and login as root for this step:

               SVRMGR> exit
              -[service0 ~]$ su -
              +[$OPENACS_SERVICE_NAME ~]$ su -
               Password: ************
               [root ~]# mkdir -p /ora8/m02/oradata/ora8/
              -[root ~]# chown service0:web /ora8/m02/oradata/ora8
              +[root ~]# chown $OPENACS_SERVICE_NAME:web /ora8/m02/oradata/ora8
               [root ~]# chmod 775 /ora8/m02/oradata/ora8
               [root ~]# exit
              -[service0 ~]$
            3. +[$OPENACS_SERVICE_NAME ~]$

      2. Create a tablespace for the service. It is important that the tablespace can autoextend. This @@ -168,10 +168,10 @@ Oracle's ability to automatically coalesce free space in the tablespace. -

        [service0 ~]$ svrmgrl
        +		

        [$OPENACS_SERVICE_NAME ~]$ svrmgrl
         SVRMGR> connect internal;
        -SVRMGR> create tablespace service0
        -      datafile '/ora8/m02/oradata/ora8/service001.dbf' 
        +SVRMGR> create tablespace $OPENACS_SERVICE_NAME
        +      datafile '/ora8/m02/oradata/ora8/$OPENACS_SERVICE_NAME01.dbf' 
               size 50M 
               autoextend on 
               next 10M
        @@ -180,26 +180,26 @@
               uniform size 32K;
      3. Create a database user for this service. Give the user access to the tablespace and rights to connect. We'll use - service0password as our password.

        + $OPENACS_SERVICE_NAMEpassword as our password.

        Write down what you specify as service_name - (i.e. service0) + (i.e. $OPENACS_SERVICE_NAME) and database_password - (i.e. service0password). You + (i.e. $OPENACS_SERVICE_NAMEpassword). You will need this information for configuring exports and AOLserver.

        -SVRMGR> create user service0 identified by service0password default tablespace service0
        -    temporary tablespace temp quota unlimited on service0;
        -SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to service0;
        -SVRMGR> revoke unlimited tablespace from service0;
        -SVRMGR> alter user service0 quota unlimited on service0;
        +SVRMGR> create user $OPENACS_SERVICE_NAME identified by $OPENACS_SERVICE_NAMEpassword default tablespace $OPENACS_SERVICE_NAME
        +    temporary tablespace temp quota unlimited on $OPENACS_SERVICE_NAME;
        +SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to $OPENACS_SERVICE_NAME;
        +SVRMGR> revoke unlimited tablespace from $OPENACS_SERVICE_NAME;
        +SVRMGR> alter user $OPENACS_SERVICE_NAME quota unlimited on $OPENACS_SERVICE_NAME;
         SVRMGR> exit;

        Your table space is now ready. In case you are trying to delete a previous OpenACS installation, consult these commands in the section called “Deleting a tablespace” below.

      4. Make sure that you can login to Oracle using your - service_name account:

        [service0 ~]$ sqlplus service0/service0password
        +        service_name account: 

        [$OPENACS_SERVICE_NAME ~]$ sqlplus $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAMEpassword
         SQL> select sysdate from dual;
         SYSDATE
         ----------
        @@ -211,17 +211,17 @@
         		  the section called “Troubleshooting Oracle Dates”
         		  

    • Prepare PostgreSQL for an OpenACS Service.�

      • PostgreSQL:

        Create a user in the database matching the service name. With default PostgreSQL authentication, a system user connecting locally automatically authenticates as the postgres user of the same name, if one exists. We currently use postgres "super-users" for everything, which means that anyone with access to any of the openacs system accounts on a machine has full access to all postgresql databases on that machine.

        [root root]# su - postgres
        -[postgres pgsql]$ createuser -a -d service0
        +[postgres pgsql]$ createuser -a -d $OPENACS_SERVICE_NAME
         CREATE USER
         [postgres pgsql]$ exit
         logout
        -[root root]#
      • Create a database with the same name as our service name, service0.

        [root root]# su - service0
        -[service0 service0]$ createdb -E UNICODE service0
        +[root root]#
      • Create a database with the same name as our service name, $OPENACS_SERVICE_NAME.

        [root root]# su - $OPENACS_SERVICE_NAME
        +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ createdb -E UNICODE $OPENACS_SERVICE_NAME
         CREATE DATABASE
        -[service0 service0]$
        -su - service0
        -createdb -E UNICODE service0
      • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

        [service0 service0]$ export EDITOR=emacs;crontab -e

        Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

        0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
        -0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0

        Depending on your distribution, you may receive +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ +su - $OPENACS_SERVICE_NAME +createdb -E UNICODE $OPENACS_SERVICE_NAME

      • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ export EDITOR=emacs;crontab -e

        Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

        0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze $OPENACS_SERVICE_NAME
        +0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze $OPENACS_SERVICE_NAME

        Depending on your distribution, you may receive email when the crontab items are executed. If you don't want to receive email for those crontab items, you can add > /dev/null @@ -232,18 +232,18 @@ specific port, e.g. port 80. In order for OpenACS to work, you need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball, - /var/lib/aolserver/service0/etc/config.tcl. - Open it in an editor to adjust the parameters.

        [root root]# su - service0
        -[service0 service0]$ cd /var/lib/aolserver/service0/etc
        -[service0 etc]$ emacs config.tcl
        +	  /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl.
        +	   Open it in an editor to adjust the parameters.

        [root root]# su - $OPENACS_SERVICE_NAME
        +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc
        +[$OPENACS_SERVICE_NAME etc]$ emacs config.tcl
         

        You can continue without changing any values in the file. However, if you don't change address to match the computer's ip address, you won't be able to browse to your server from other machines.

        • httpport - If you want your server on a different port, enter it here. The Reference Platform port is 8000, which is suitable for development use. Port 80 is the standard http port - it's the port used by your browser when you enter http://yourserver.test. So you should use port 80 for your production site.

        • httpsport - This is the port for https requests. The Reference Platform https port is 8443. If http port is set to 80, httpsport should be 143 to match the standard.

        • - address - The IP address of the server. If you are hosting multiple IPs on one computer, this is the address specific to the web site. Each virtual server will ignore any requests directed at other addresses.

        • server - This is the keyword that, by convention, identifies the service. It is also used as part of the path for the service root, as the name of the user for running the service, as the name of the database, and in various dependent places. The Reference Platform uses service0. + address - The IP address of the server. If you are hosting multiple IPs on one computer, this is the address specific to the web site. Each virtual server will ignore any requests directed at other addresses.

        • server - This is the keyword that, by convention, identifies the service. It is also used as part of the path for the service root, as the name of the user for running the service, as the name of the database, and in various dependent places. The Reference Platform uses $OPENACS_SERVICE_NAME.

        • db_name - In almost all cases, this can be kept as a reference to $server. If for some reason, @@ -260,29 +260,29 @@

        • Enable OpenFTS Full Text Search (OPTIONAL)

        • Install nsopenssl for SSL support. (OPTIONAL)

      • Verify AOLserver startup.�

        1. Kill any current running AOLserver processes and start a new - one. The recommended way to start an AOLserver process is by running the included script, /var/lib/aolserver/service0/etc/daemontools/run. If you are not using the default file paths and names, you will need to edit run.

          If you want to use port 80, there are complications. AOLserver must be root to use system ports such as + one. The recommended way to start an AOLserver process is by running the included script, /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/run. If you are not using the default file paths and names, you will need to edit run.

          If you want to use port 80, there are complications. AOLserver must be root to use system ports such as 80, but refuses to run as root for security reasons. So, we call the run script as root and specify a non-root user ID and Group ID which AOLserver will switch to after claiming the port. To do so, find the UID and GID of the - service0 user via - grep service0 + $OPENACS_SERVICE_NAME user via + grep $OPENACS_SERVICE_NAME /etc/passwd and then put those numbers into the command line via -u 501 -g 502. In AOLserver 4, you must also send a -b flag. Do this by editing the run file as indicated in the comments.

          If you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep - nsd and selectively kill by job number.

          [service0 etc]$ killall nsd
          +	  nsd and selectively kill by job number.

          [$OPENACS_SERVICE_NAME etc]$ killall nsd
           nsd: no process killed
          -[service0 service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/etc/config.tcl
          -[service0 service0]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file...
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl
          +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file...
           [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.
        2. Attempt to connect to the service from a web browser. You should specify a URL like: http://yourserver.test:8000

          You should see a page that looks like this. If you imported your files into cvs, now that you know it worked you can erase the temp - directory with rm -rf /var/lib/aolserver/service0.orig. + directory with rm -rf /var/lib/aolserver/$OPENACS_SERVICE_NAME.orig.

          If you don't see the login page, view your error log - (/var/lib/aolserver/service0/log/service0-error.log) + (/var/lib/aolserver/$OPENACS_SERVICE_NAME/log/$OPENACS_SERVICE_NAME-error.log) to make sure the service is starting without any problems. The most common errors here are trying to start a port 80 server while not root, failing to connect because of @@ -346,7 +346,7 @@ being restarted; note that unless you already set up a way for AOLserver to restart itself (ie. inittab or daemontools), you'll need to manually restart your service. -

          [service0 service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/config.tcl
        3. +

          [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/$OPENACS_SERVICE_NAME/config.tcl
        4. Give the server a few minutes to start up. Then reload the final page above. You should see the front page, with an area to login near the upper right. Congratulations, OpenACS @@ -362,8 +362,8 @@ database while logged in as the service user. They do not directly affect the service's run-time connection with the database, because those environmental variables are set by the - wrapper scripts nsd-postgres and nsd-oracle.

          [root root]# su - service0
          -[service0 service0]$ emacs .bashrc

          Put in the appropriate lines for the database you are running. If you will use both databases, put in both sets of lines.

          • PostgreSQL:

            export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
            +	wrapper scripts nsd-postgres and nsd-oracle.

            [root root]# su - $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ emacs .bashrc

            Put in the appropriate lines for the database you are running. If you will use both databases, put in both sets of lines.

            • PostgreSQL:

              export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
               export PATH=$PATH:/usr/local/pgsql/bin
            • Oracle. These environment variables are specific for a local Oracle installation communicating via IPC. If you are connecting to a remote Oracle installation, you'll need to adjust these appropriately. Also, @@ -375,10 +375,10 @@ export ORACLE_SID=ora8 export ORACLE_TERM=vt100 export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

          Test this by logging out and back in as - service0 and checking the paths.

          [service0 service0]$ exit
          +	$OPENACS_SERVICE_NAME and checking the paths.

          [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
           logout
          -[root src]# su - service0
          -[service0 ~]$ env
          +[root src]# su - $OPENACS_SERVICE_NAME
          +[$OPENACS_SERVICE_NAME ~]$ env
           
          • For PostgreSQL, you should see:

             LD_LIBRARY_PATH=:/usr/local/pgsql/lib
             PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:\
            Index: openacs-4/packages/acs-core-docs/www/oracle.html
            ===================================================================
            RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/oracle.html,v
            diff -u -r1.35 -r1.36
            --- openacs-4/packages/acs-core-docs/www/oracle.html	5 May 2004 12:36:04 -0000	1.35
            +++ openacs-4/packages/acs-core-docs/www/oracle.html	11 Jun 2004 10:17:38 -0000	1.36
            @@ -1,62 +1,66 @@
            -Install Oracle 8.1.7

            Install Oracle 8.1.7

            By Vinod Kurup

            +Install Oracle 8.1.7

            Install Oracle 8.1.7

            By Vinod Kurup

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

            Note

            - Skip this section if you're not interested in Oracle. -

            - OpenACS 5.2.0d1 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. -

            - - This document assumes that you'll be installing Oracle on the same - box as AOLserver. For more details on a remote Oracle installation, - see Daryl Biberdorf's document. - -

            Acquire Oracle 8.1.7 Enterprise Edition

            - - You can obtain the software through a variety of methods (You'll need - to become a member of technet.oracle.com, which is - free): - -

            1. - - Order a CD from the Oracle - Store. The cost is currently $39.95 for a 30-day - evaluation copy with delivery estimated between 3-4 business - days. - -

            2. - - Download the software from the - Oracle Downloads page. - -

              • - - Oracle 8.1.7 now comes with a Java RunTime - Environment built-in to the distribution, so you no longer - have to download and install it separately. - +

              + If you are installing PostGreSQL instead of Oracle, skip this section. +

              + OpenACS 5.2.0d1 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. +

              + This installation guide attempts to present all of the information necessary to complete an OpenACS installation. We try hard to make all of the steps possible in one pass, rather than having a step which amounts to "go away and develop a profound understanding of software X and then come back and, in 99% of all cases, type these two lines." The exception to our rule is Oracle production systems. This page describes a set of steps to get a working Oracle development server, but it is unsuitable for production systems. If you will be using OpenACS on Oracle in a production environment, you will experience many problems unless you develop a basic understanding of Oracle which is outside the scope of this document. T +

              + + This document assumes that you'll be installing Oracle on the same + box as AOLserver. For more details on a remote Oracle installation, + see Daryl Biberdorf's document. + +

              + + Useful links to find help on how to set up Oracle under Linux are:

              Acquire Oracle

              + Production Oracle systems should run on certified platforms. Follow the + metalink + note 223718.1to find certified platforms. If you don't have + metalink access, take a look at the Oracle on Linux FAQ: Which + Linux Distributions Are Directly Supported By Oracle?. In summary, + free and inexpensive Linux distributions are not certified. +

              + If you don't have an account at OTN + get one: you can download the Oracle software from the + Oracle Downloads page. It is also get the CDs shipped to you for + a nominal fee from the Oracle + Store. +

              + Each Oracle release comes with extensive and usually quite well-written + documentation. Your first step should be to thoroughly read the release + notes for your operating system and your Oracle version. Find the docs + here:

              • + Oracle 8i + Release Documentation

              • + Oracle 9i Release Documentation

              • - - See these - instructions to download the 8.1.7.4 patchset. Note - that you can't back out of an Oracle patchset once it's - installed. You have to reinstall the whole thing from scratch. - -

              • - - After the download is complete, untar the file - to a convenient location. To do this, you will need to login - and cd to the directory where the archive is. - -

                -$ cd /directory/where/oracle/is
                -$ tar xvf oracle81701.tar
            3. - - It used to be possible to get a free CD by mail, but - I can no longer find the link for that option. - -

            Things to Keep in Mind

            - + Oracle + 10g Release Documentation

          It is generally useful to run a particular Oracle version with its + latest patchset. At the time of writing these were 8.1.7.4 and 9.2.0.5, + both of which are considered to be very stable. +

          + To be able to download a patchset, you need a (to-pay-for) account on Metalink. You may find the appropriate + patchset by following Andrew's + suggestion. +

        Things to Keep in Mind

        + Oracle is very well-documented software, the online documentation comes with + printable PDFs and full-text search. Altogether there is more than + 20.000 pages of documentation, so do not expect to understand Oracle + within in a few hours. The best starting pointing into Oracle is the + Concepts book. Here's the 8i + version and the 9.2 + version. +

        + To give you an idea of how configurable Oracle is and how much thought + you may need to put into buying the proper hardware and creating a sane + setup, you should thoroughly read Cary Millsap's Configuring + Oracle Server for VLDB and the Optimal + Flexible Architecture standard. +

        Throughout these instructions, we will refer to a number of configurable settings and advise certain defaults. With the exception of passwords, we advise you to follow these defaults unless you know @@ -65,10 +69,24 @@ later. For a guide to the defaults, please see the section called “Defaults”.

        + In order for OpenACS to work properly you need to set the environment + appropriately. +

        +export ORACLE_BASE=/ora8/m01/app/oracle
        +export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
        +export PATH=$PATH:$ORACLE_HOME/bin
        +export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
        +export ORACLE_SID=ora8
        +export ORACLE_TERM=vt100
        +export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
         
        +umask 022
        +open_cursors = 500
        +nls_date_format = "YYYY-MM-DD"

        + For additional resources/documentation, please see this thread and Andrew - Piskorski's mini-guide.. + Piskorski's mini-guide.

        Pre-Installation Tasks

        @@ -1214,7 +1232,7 @@

         SQL> drop tablespace table_space_name including contents cascade constraints;

    For more information on Oracle, please consult the documentation. -

    Defaults

    We used the following defaults while installing Oracle.

    VariableValueReason
    ORACLE_HOME/ora8/m01/app/oracle/product/8.1.7This is the default Oracle installation directory.
    ORACLE_SERVICEora8The service name is a domain-qualified identifier for +

    Defaults

    We used the following defaults while installing Oracle.

    VariableValueReason
    ORACLE_HOME/ora8/m01/app/oracle/product/8.1.7This is the default Oracle installation directory.
    ORACLE_SERVICEora8The service name is a domain-qualified identifier for your Oracle server.
    ORACLE_SIDora8This is an identifier for your Oracle server.
    ORACLE_OWNERoracleThe user who owns all of the oracle files.
    ORACLE_GROUPdbaThe special oracle group. Users in the dba group are authorized to do a connect internal within Index: openacs-4/packages/acs-core-docs/www/os-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-install.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/os-install.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/os-install.html 11 Jun 2004 10:17:38 -0000 1.7 @@ -1,4 +1,4 @@ -Linux Install Guides

    Linux Install Guides

    +Linux Install Guides

    Linux Install Guides

    Here's a list of some helpful documentation for various OS's

    • Painless Debian Index: openacs-4/packages/acs-core-docs/www/os-security.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-security.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/os-security.html 5 May 2004 12:36:04 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/os-security.html 11 Jun 2004 10:17:38 -0000 1.7 @@ -1,4 +1,4 @@ -Security Information

      Security Information

      +Security Information

      Security Information

      Once you get your OS installed, it's imperative that you secure your installation. As Jon Griffin repeatedly warns us, "No distribution is secure out of the box." The Reference Platform implements Index: openacs-4/packages/acs-core-docs/www/packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/packages.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/packages.html 5 May 2004 12:36:04 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/packages.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -OpenACS Packages

      OpenACS Packages

      By Pete Su and Bryan Quinn

      +OpenACS Packages

      OpenACS Packages

      By Pete Su and Bryan Quinn

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      Overview

      Index: openacs-4/packages/acs-core-docs/www/parties.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/parties.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/parties.html 5 May 2004 12:36:04 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/parties.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -Parties in OpenACS

      Parties in OpenACS

      By Rafael H. Schloming

      +Parties in OpenACS

      Parties in OpenACS

      By Rafael H. Schloming

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      Introduction

      While many applications must deal with individuals and many applications Index: openacs-4/packages/acs-core-docs/www/permissions-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-design.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 5 May 2004 12:36:04 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 11 Jun 2004 10:17:38 -0000 1.23 @@ -1,4 +1,4 @@ -Permissions Design

      Permissions Design

      By John Prevost and Rafael H. Schloming

      +Permissions Design

      Permissions Design

      By John Prevost and Rafael H. Schloming

      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

      Essentials

      • Tcl in packages/acs-kernel

      • OpenACS 4 Permissions Requirements

      • Index: openacs-4/packages/acs-core-docs/www/permissions-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-requirements.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 5 May 2004 12:36:04 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 11 Jun 2004 10:17:38 -0000 1.23 @@ -1,4 +1,4 @@ -Permissions Requirements

        Permissions Requirements

        By John McClary Prevost

        +Permissions Requirements

        Permissions Requirements

        By John McClary Prevost

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Introduction

        This document records requirements for the OpenACS 4 Permissions system, a Index: openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 5 May 2004 12:36:06 -0000 1.29 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 11 Jun 2004 10:17:38 -0000 1.30 @@ -1,4 +1,4 @@ -OpenACS Permissions Tediously Explained

        OpenACS Permissions Tediously Explained

        +OpenACS Permissions Tediously Explained

        OpenACS Permissions Tediously Explained

        by Vadim Nasardinov. Modified and converted to Docbook XML by Roberto Mello

        The code has been modified since this document was written so it is now out of date. See this forum thread.

        Overview

        The general permissions system has a relatively complex data model in OpenACS. @@ -100,7 +100,7 @@

        Context Hierarchy

        Suppose objects A, B, ..., and F form the following hierarchy. -

        Table�11.1.�Context Hierarchy Example

        A

        +

        Table�11.1.�Context Hierarchy Example

        A

        object_id=10

        B

        object_id=20 @@ -116,7 +116,7 @@ This can be represented in the acs_objects table by the following entries: -

        Table�11.2.�acs_objects example data

        object_idcontext_id
        2010
        3010
        4020
        5020
        6030

        +

        Table�11.2.�acs_objects example data

        object_idcontext_id
        2010
        3010
        4020
        5020
        6030

        The first entry tells us that object 20 is the descendant of object 10, and the third entry shows that object 40 is the descendant of object 20. By running a CONNECT BY query, Index: openacs-4/packages/acs-core-docs/www/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/permissions.html 5 May 2004 12:36:06 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/permissions.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -Groups, Context, Permissions

        Groups, Context, Permissions

        By Pete Su

        +Groups, Context, Permissions

        Groups, Context, Permissions

        By Pete Su

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Overview

        Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.34 -r1.35 --- openacs-4/packages/acs-core-docs/www/postgres.html 5 May 2004 12:36:06 -0000 1.34 +++ openacs-4/packages/acs-core-docs/www/postgres.html 11 Jun 2004 10:17:38 -0000 1.35 @@ -1,4 +1,4 @@ -Install PostgreSQL

        Install PostgreSQL

        by Vinod Kurup

        +Install PostgreSQL

        Install PostgreSQL

        by Vinod Kurup

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Skip this section if you will run only Oracle.

        OpenACS 5.2.0d1 will run with PostgreSQL 7.3.2, 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL. PostgreSQL 7.4 has been verified.

        • Special notes for Mac OS X.�If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.

        • Special Notes for Debian.�

          Debian users, especially Debian stable users, should @@ -80,9 +80,9 @@ sudo niutil -createprop / /users/postgres gid 201 sudo niutil -createprop / /users/postgres uid 502 sudo niutil -createprop / /users/postgres home /usr/local/pgsql -sudo niutil -create / /users/service0 -sudo niutil -createprop / /users/service0 gid 201 -sudo niutil -createprop / /users/service0 uid 201 +sudo niutil -create / /users/$OPENACS_SERVICE_NAME +sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME gid 201 +sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME uid 201 mkdir -p /usr/local/pgsql chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.1 chmod 750 /usr/local/pgsql

      • Set up postgres's environment variables.�They are necessary for the executable to find its supporting @@ -100,7 +100,7 @@ Change to the postgres user and run ./configure to set the compilation options automatically. This is the point at which you can configure PostgreSQL in various ways. For example, if you want to enable - Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help. + Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.

        On debian woody (stable, 3.0), do ./configure --without-readline --without-zlib.

        [root src]# su - postgres
         [postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4
         [postgres postgresql-7.3.4]$ ./configure --with-includes=/sw/include/ --with-libraries=/sw/lib --enable-locale --enable-multibyte \
        @@ -287,7 +287,7 @@
         root:~ # /etc/rc.d/init.d/rc2.d/S20postgresql start
         Starting PostgreSQL: ok
         root:~ # 
      • Mac OS X:

        1. Install the startup script:

          cd /Library/StartupItems/
          -tar xfz /var/lib/aolserver/service0/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz
          +tar xfz /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz
           
      • From now on, PostgreSQL should start automatically each time you boot Index: openacs-4/packages/acs-core-docs/www/profile-code.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/profile-code.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/profile-code.html 5 May 2004 12:36:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/profile-code.html 11 Jun 2004 10:17:38 -0000 1.3 @@ -1,7 +1,7 @@ -Profile your code

        Profile your code

        There are several facilities for profiling your code in +Profile your code

        Profile your code

        There are several facilities for profiling your code in OpenACS. The first thing to do is to install the developer-support package and play around with it. But there is also support in the API for profiling your code: profiling your code using ds_profile -

        View comments on this page at openacs.org
        +

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 5 May 2004 12:36:06 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -Programming with AOLserver

        Programming with AOLserver

        By Michael Yoon, Jon Salz and Lars Pind.

        +Programming with AOLserver

        Programming with AOLserver

        By Michael Yoon, Jon Salz and Lars Pind.

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        The global command

        Index: openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html,v diff -u -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 5 May 2004 12:36:06 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 11 Jun 2004 10:17:38 -0000 1.27 @@ -1,4 +1,4 @@ -Add PSGML commands to emacs init file (OPTIONAL)

        Add PSGML commands to emacs init file (OPTIONAL)

        +Add PSGML commands to emacs init file (OPTIONAL)

        Add PSGML commands to emacs init file (OPTIONAL)

        If you plan to write or edit any documentation with emacs, install a customized emacs configuration file with DocBook commands in the skeleton directory, so it will be used for all new users. The file also Index: openacs-4/packages/acs-core-docs/www/psgml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-mode.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 5 May 2004 12:36:06 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -Using PSGML mode in Emacs

        Using PSGML mode in Emacs

        By David Lutterkort

        +Using PSGML mode in Emacs

        Using PSGML mode in Emacs

        By David Lutterkort

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Note: nxml mode replaces and/or complements psgml mode. More information.

        What it is

        PSGML Mode is a mode for editing, umm, SGML and XML documents in emacs. It Index: openacs-4/packages/acs-core-docs/www/release-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/release-notes.html,v diff -u -r1.39 -r1.40 --- openacs-4/packages/acs-core-docs/www/release-notes.html 5 May 2004 12:36:06 -0000 1.39 +++ openacs-4/packages/acs-core-docs/www/release-notes.html 11 Jun 2004 10:17:38 -0000 1.40 @@ -1,4 +1,4 @@ -OpenACS Release Notes

        OpenACS Release Notes

        Version 5.1.0

        • Lots of little tweaks and fixes

        • Complete Change list since 5.0.0 in Changelog

        • Many Bug fixes

        Version 5.0.4

        • New translations, including for .LRN 2.0.2.

        Version 5.0.1

        • All work on the translation server from 7 Nov 2003 to 7 Feb 2004 is now included in catalogs.

        • One new function in acs-tcl, util::age_pretty

        • Complete Change list since 5.0.0 in Changelog

        • Many documentation updates and doc bug fixes

        Version 5.0.0

        +OpenACS Release Notes

        OpenACS Release Notes

        Version 5.1.0

        • Lots of little tweaks and fixes

        • Complete Change list since 5.0.0 in Changelog

        • Many Bug fixes

        Version 5.0.4

        • New translations, including for .LRN 2.0.2.

        Version 5.0.1

        • All work on the translation server from 7 Nov 2003 to 7 Feb 2004 is now included in catalogs.

        • One new function in acs-tcl, util::age_pretty

        • Complete Change list since 5.0.0 in Changelog

        • Many documentation updates and doc bug fixes

        Version 5.0.0

        This is OpenACS 5.0.0. This version contains no known security, data loss, or crashing bugs, nor any bugs judged release blockers. This version has received manual testing. It has passed current automated testing, which is not comprehensive. This release contains work done on the translation server http://translate.openacs.org through 7 Nov 2003.

        Please report bugs using our @@ -95,4 +95,4 @@

      • Serving backup files and files from the CVS directories is turned off by default via the acs-kernel parameter ExcludedFiles in section request-processor (The variable provides a string match glob list of files and is defaulted to "*/CVS/* *~") -

      • ($Id$)
        View comments on this page at openacs.org
        +

        ($Id$)
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 5 May 2004 12:36:06 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs-core.html 11 Jun 2004 10:17:38 -0000 1.7 @@ -1,7 +1,7 @@ -OpenACS Core and .LRN

        OpenACS Core and .LRN

        1. Update Translations.�the section called “How to Update the translations”

        2. Update Version Numbers.�The version numbers in the documentation and in the packages must be updated. This should only happen after a release candidate is approved.

          .LRN: this must be repeated for .LRN modules (dotlrn-core in the dotlrn cvs tree) and for any modified modules in the .LRN prerequisites (dotlrn-prereq in openacs cvs tree). My current working model is that I bulk-update .LRN and OpenACS core but that I don't touch dotlrn-prereq modules - I just use the most recent release and it's up to individual package developers to tag and release those packages when they change. This model is already broken because following it means that dotlrn-prereqs don't get new translations.
          1. Update /var/lib/aolserver/service0/packages/acs-core-docs/www/xml/variables.ent with the new version number. -

          2. Add new section in /var/lib/aolserver/service0/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml -

          3. Regenerate all HTML docs

            cd /var/lib/aolserver/service0/packages/acs-core-docs/www/xml
            -make
          4. Update /var/lib/aolserver/service0/readme.txt with the new version number

          5. Update version number in all of the core packages. Here's a bash/perl script which works but could be made easier to use. Run it from /var/lib/aolserver/service0/packages:

            #!/bin/sh
            +OpenACS Core and .LRN

            OpenACS Core and .LRN

            1. Update Translations.�the section called “How to Update the translations”

            2. Update Version Numbers.�The version numbers in the documentation and in the packages must be updated. This should only happen after a release candidate is approved.

              .LRN: this must be repeated for .LRN modules (dotlrn-core in the dotlrn cvs tree) and for any modified modules in the .LRN prerequisites (dotlrn-prereq in openacs cvs tree). My current working model is that I bulk-update .LRN and OpenACS core but that I don't touch dotlrn-prereq modules - I just use the most recent release and it's up to individual package developers to tag and release those packages when they change. This model is already broken because following it means that dotlrn-prereqs don't get new translations.
              1. Update /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/variables.ent with the new version number. +

              2. Add new section in /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml +

              3. Regenerate all HTML docs

                cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/xml
                +make
              4. Update /var/lib/aolserver/$OPENACS_SERVICE_NAME/readme.txt with the new version number

              5. Update version number in all of the core packages. Here's a bash/perl script which works but could be made easier to use. Run it from /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages:

                #!/bin/sh
                 # run this file from ../packages to renumber all .info version numbers
                 
                 #---------------------------------------------------------------------
                @@ -20,7 +20,7 @@
                   perl -p -i -e 's/name="5\.0\.0"/name="5\.1\.0d1"/' $dir
                   perl -p -i -e 's/-5\.0\.0.apm"/-5\.1\.0d1.apm"/' $dir
                   perl -p -i -e 's/(provides.*version)="5\.0\.0"/\1="5\.1\.0d1"/' $dir
                -done
              6. Commit changes to CVS

            3. Rubuild the Changelog.�Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir:

              cd /var/lib/aolserver/service0
              +done
            4. Commit changes to CVS

          6. Rubuild the Changelog.�Rebuild the Changelog. I use a tool called cvs2cl. Run this command from the package root to automatically generate a Changelog file in the same dir:

            cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
             perl /var/tmp/cvs2cl/cvs2cl.pl -F oacs-5-0 --delta openacs-5-0-0-final:oacs-5-0

            Commit changes

          7. Tag the files in CVS.�The steps to this point should have ensured that the head of the current branch contains the full set of code to release. Now we need to tag it as the code to be released.

            1. Check out OpenACS Core. The files must be checked Index: openacs-4/packages/acs-core-docs/www/releasing-openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs.html,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 5 May 2004 12:36:06 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 11 Jun 2004 10:17:38 -0000 1.18 @@ -1 +1 @@ -Chapter�16.�Releasing OpenACS

              View comments on this page at openacs.org
              +Chapter�16.�Releasing OpenACS
              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/releasing-package.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-package.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/releasing-package.html 5 May 2004 12:36:06 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/releasing-package.html 11 Jun 2004 10:17:38 -0000 1.4 @@ -1,4 +1,4 @@ -How to package and release an OpenACS Package

              How to package and release an OpenACS Package

              In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.

              1. Update the version number of your package in the APM.

              2. Make sure all changes are committed.

              3. Tag the updated work.:

                cd /var/lib/aolserver/service0/packages/myfirstpackage
                +How to package and release an OpenACS Package

                How to package and release an OpenACS Package

                In this example, we are packaging and releasing myfirstpackage as version 1.0.0, which is compatible with OpenACS 5.0.x.

                1. Update the version number of your package in the APM.

                2. Make sure all changes are committed.

                3. Tag the updated work.:

                  cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage
                   cvs tag myfirstpackages-1-0-0-final
                   cvs tag -F openacs-5-0-compat
                   

                Done. The package will be added to the repository automatically. If the correct version does not show up within 24 hours, ask for help on the OpenACS.org development forum.

                View comments on this page at openacs.org
                Index: openacs-4/packages/acs-core-docs/www/remote-postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/remote-postgres.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/remote-postgres.html 5 May 2004 12:36:06 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/remote-postgres.html 11 Jun 2004 10:17:38 -0000 1.3 @@ -1,4 +1,4 @@ -Running a PostgreSQL database on another server

                Running a PostgreSQL database on another server

                To run a database on a different machine than the +Running a PostgreSQL database on another server

                Running a PostgreSQL database on another server

                To run a database on a different machine than the webserver requires changes to the database configuration file and access control file, and to the OpenACS service's configuration file.

                • Edit the database configuration file, which in a @@ -7,5 +7,5 @@ permit specific remote clients to access. Access can be controlled ... (add notes from forum post)

                • Change the OpenACS service's configuration file to point to the remote database. Edit - /var/lib/aolserver/service0/etc/config.tcl + /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/config.tcl and change

                  to

                View comments on this page at openacs.org
                Index: openacs-4/packages/acs-core-docs/www/request-processor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/request-processor.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/request-processor.html 5 May 2004 12:36:06 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -The Request Processor

                The Request Processor

                By Pete Su

                +The Request Processor

                The Request Processor

                By Pete Su

                OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                Overview

                Index: openacs-4/packages/acs-core-docs/www/requirements-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/requirements-template.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 5 May 2004 12:36:07 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 11 Jun 2004 10:17:38 -0000 1.36 @@ -1,4 +1,4 @@ -System/Application Requirements Template

                System/Application Requirements Template

                By You

                +System/Application Requirements Template

                System/Application Requirements Template

                By You

                OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                Introduction

                Index: openacs-4/packages/acs-core-docs/www/rp-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-design.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/rp-design.html 5 May 2004 12:36:07 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 11 Jun 2004 10:17:38 -0000 1.26 @@ -1,4 +1,4 @@ -Request Processor Design

                Request Processor Design

                By Rafael H. Schloming

                +Request Processor Design

                Request Processor Design

                By Rafael H. Schloming

                OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                Essentials

                • OpenACS 4 Request Processor Requirements

                • Index: openacs-4/packages/acs-core-docs/www/rp-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-requirements.html,v diff -u -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 5 May 2004 12:36:07 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 11 Jun 2004 10:17:38 -0000 1.22 @@ -1,4 +1,4 @@ -Request Processor Requirements

                  Request Processor Requirements

                  By Rafael H. Schloming

                  +Request Processor Requirements

                  Request Processor Requirements

                  By Rafael H. Schloming

                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Introduction

                  The following is a requirements document for the OpenACS 4.0 request Index: openacs-4/packages/acs-core-docs/www/security-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-design.html,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/security-design.html 5 May 2004 12:36:07 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/security-design.html 11 Jun 2004 10:17:39 -0000 1.24 @@ -1,4 +1,4 @@ -Security Design

                  Security Design

                  By Richard Li and Archit Shah

                  +Security Design

                  Security Design

                  By Richard Li and Archit Shah

                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Introduction

                  Index: openacs-4/packages/acs-core-docs/www/security-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-notes.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/security-notes.html 5 May 2004 12:36:07 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 11 Jun 2004 10:17:39 -0000 1.36 @@ -1,4 +1,4 @@ -Security Notes

                  Security Notes

                  By Richard Li

                  +Security Notes

                  Security Notes

                  By Richard Li

                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Index: openacs-4/packages/acs-core-docs/www/security-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-requirements.html,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 5 May 2004 12:36:07 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 11 Jun 2004 10:17:39 -0000 1.24 @@ -1,4 +1,4 @@ -Security Requirements

                  Security Requirements

                  By Richard Li

                  +Security Requirements

                  Security Requirements

                  By Richard Li

                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Introduction

                  Index: openacs-4/packages/acs-core-docs/www/snapshot-backup.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/snapshot-backup.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/snapshot-backup.html 5 May 2004 12:36:07 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/snapshot-backup.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1,4 +1,4 @@ -Manual backup and recovery

                  Manual backup and recovery

                  This section describes how to make a one-time backup and +Manual backup and recovery

                  Manual backup and recovery

                  This section describes how to make a one-time backup and restore of the files and database. This is useful for rolling back to known-good versions of a service, such as at initial installation and just before an upgrade. First, you back up the @@ -63,15 +63,15 @@ . exporting dimensions . exporting post-schema procedural objects and actions . exporting statistics -Export terminated successfully without warnings.

            2. PostgreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

              [root root]# su - service0
              -[service0 service0]$ pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp service0
              -[service0 service0]$ ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp 
              --rw-rw-r-x    1 service0  service0   4005995 Feb 21 18:28 /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
              -[service0 service0]$ exit
              +Export terminated successfully without warnings.
          8. PostgreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

            [root root]# su - $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp 
            +-rw-rw-r-x    1 $OPENACS_SERVICE_NAME  $OPENACS_SERVICE_NAME   4005995 Feb 21 18:28 /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp
            +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
             [root root]#
            -su - service0
            -pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp openacs-dev
            -ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
            +su - $OPENACS_SERVICE_NAME
            +pg_dump -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp openacs-dev
            +ls -al /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/before_upgrade_to_4.6.dmp
             exit
        3. Back up the file system.�Back up all of the files in the service, including the database backup file but excluding the auto-generated supervise directory, which is @@ -82,51 +82,51 @@ break anything by omitting them.

        4. The --file clause specifies the name of the output file to be generated; we manually add the correct extensions.

        5. The last clause, - /var/lib/aolserver/service0/, + /var/lib/aolserver/$OPENACS_SERVICE_NAME/, specifies the starting point for backup. Tar defaults to - recursive backup.

        [root root]# su - service0
        -[service0 service0]$ tar -cpsz --exclude /var/lib/aolserver/service0/etc/daemontools/supervise \
        -   --file /tmp/service0-backup.tar.gz /var/lib/aolserver/service0/
        +            recursive backup.

        [root root]# su - $OPENACS_SERVICE_NAME
        +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ tar -cpsz --exclude /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools/supervise \
        +   --file /tmp/$OPENACS_SERVICE_NAME-backup.tar.gz /var/lib/aolserver/$OPENACS_SERVICE_NAME/
         tar: Removing leading `/' from member names
        -[service0 service0]$
      • Suffer a catastrophic failure on your production system.�(We'll simulate this step)

        [root root]# svc -d /service/service0
        -[root root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
        -[root root]# rm /service/service0
        -rm: remove symbolic link `/service/service0'? y
        -[root root]# ps -auxw | grep service0
        -root      1496  0.0  0.0  1312  252 ?        S    16:58   0:00 supervise service0
        +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$
      • Suffer a catastrophic failure on your production system.�(We'll simulate this step)

        [root root]# svc -d /service/$OPENACS_SERVICE_NAME
        +[root root]# mv /var/lib/aolserver/$OPENACS_SERVICE_NAME/ /var/lib/aolserver/$OPENACS_SERVICE_NAME.lost
        +[root root]# rm /service/$OPENACS_SERVICE_NAME
        +rm: remove symbolic link `/service/$OPENACS_SERVICE_NAME'? y
        +[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
        +root      1496  0.0  0.0  1312  252 ?        S    16:58   0:00 supervise $OPENACS_SERVICE_NAME
         [root root]# kill 1496
        -[root root]# ps -auxw | grep service0
        +[root root]# ps -auxw | grep $OPENACS_SERVICE_NAME
         [root root]# su - postgres
        -[postgres pgsql]$ dropdb service0
        +[postgres pgsql]$ dropdb $OPENACS_SERVICE_NAME
         DROP DATABASE
        -[postgres pgsql]$ dropuser service0
        +[postgres pgsql]$ dropuser $OPENACS_SERVICE_NAME
         DROP USER
         [postgres pgsql]$ exit
         logout
         [root root]#
      • Recovery.�

        1. Restore the operating system and required software. You can do this with standard backup processes or by keeping copies of the install material (OS CDs, OpenACS tarball and supporting software) and repeating the install - guide. Recreate the service user (service0).

        2. Restore the OpenACS files and database backup file.

          [root root]# su - service0
          -[service0 service0]$ cd /var/lib/aolserver
          -[service0 aolserver]$ tar xzf /tmp/service0-backup.tar.gz
          -[service0 aolserver]$ chmod -R 775 service0
          -[service0 aolserver]$ chown -R service0.web service0
        3. Restore the database

          • Oracle.�

            1. Set up a clean Oracle database user and - tablespace with the same names as the ones exported from (more information).

            2. Invoke the import command

              imp service0/service0 FILE=/var/lib/aolserver/service0/database-backup/nighty_backup.dmp FULL=Y
          • Postgres.�If the database user does not already exist, create it.

            [root root]# su - postgres
            -[postgres ~]$ createuser service0
            +            guide.  Recreate the service user ($OPENACS_SERVICE_NAME).

          • Restore the OpenACS files and database backup file.

            [root root]# su - $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver
            +[$OPENACS_SERVICE_NAME aolserver]$ tar xzf /tmp/$OPENACS_SERVICE_NAME-backup.tar.gz
            +[$OPENACS_SERVICE_NAME aolserver]$ chmod -R 775 $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME aolserver]$ chown -R $OPENACS_SERVICE_NAME.web $OPENACS_SERVICE_NAME
          • Restore the database

            • Oracle.�

              1. Set up a clean Oracle database user and + tablespace with the same names as the ones exported from (more information).

              2. Invoke the import command

                imp $OPENACS_SERVICE_NAME/$OPENACS_SERVICE_NAME FILE=/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/nighty_backup.dmp FULL=Y
            • Postgres.�If the database user does not already exist, create it.

              [root root]# su - postgres
              +[postgres ~]$ createuser $OPENACS_SERVICE_NAME
               Shall the new user be allowed to create databases? (y/n) y
               Shall the new user be allowed to create more new users? (y/n) y
               CREATE USER
               [postgres ~]$ exit
              -

              Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.

              [root root]# su - service0
              -[service0 ~]$ createdb service0
              +

              Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.

              [root root]# su - $OPENACS_SERVICE_NAME
              +[$OPENACS_SERVICE_NAME ~]$ createdb $OPENACS_SERVICE_NAME
               CREATE DATABASE
              -[service0 ~]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
              +[$OPENACS_SERVICE_NAME ~]$ psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/postgresql.sql $OPENACS_SERVICE_NAME
               (many lines omitted)
              -[service0 ~]$ psql service0 < /var/lib/aolserver/service0/database-backup/database-backup.dmp
              +[$OPENACS_SERVICE_NAME ~]$ psql $OPENACS_SERVICE_NAME < /var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup/database-backup.dmp
               (many lines omitted)
              -[service0 ~]$ exit
              +[$OPENACS_SERVICE_NAME ~]$ exit
               [postgres ~]$ exit
              -logout
          • Activate the service

            [root root]# ln -s /var/lib/aolserver/service0/etc/daemontools /service/service0
            +logout
        4. Activate the service

          [root root]# ln -s /var/lib/aolserver/$OPENACS_SERVICE_NAME/etc/daemontools /service/$OPENACS_SERVICE_NAME
           [root root]# sleep 10
          -[root root]# svgroup web /service/service0
      • View comments on this page at openacs.org
        +[root root]# svgroup web /service/$OPENACS_SERVICE_NAME
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/style-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/style-guide.html,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/style-guide.html 5 May 2004 12:36:07 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/style-guide.html 11 Jun 2004 10:17:39 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS Style Guide

        OpenACS Style Guide

        +OpenACS Style Guide

        OpenACS Style Guide

        By Jeff Davis

        Motivation

        Why have coding standards for OpenACS? And if the code works why change it to Index: openacs-4/packages/acs-core-docs/www/subsites-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-design.html,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/subsites-design.html 5 May 2004 12:36:07 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/subsites-design.html 11 Jun 2004 10:17:39 -0000 1.24 @@ -1,4 +1,4 @@ -Subsites Design Document

        Subsites Design Document

        By Rafael H. Schloming

        +Subsites Design Document

        Subsites Design Document

        By Rafael H. Schloming

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        *Note* This document has not gone through the any of the Index: openacs-4/packages/acs-core-docs/www/subsites-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-requirements.html,v diff -u -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/subsites-requirements.html 5 May 2004 12:36:07 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/subsites-requirements.html 11 Jun 2004 10:17:39 -0000 1.23 @@ -1,4 +1,4 @@ -Subsites Requirements

        Subsites Requirements

        By Rafael H. Schloming and Dennis Gregorovic

        +Subsites Requirements

        Subsites Requirements

        By Rafael H. Schloming and Dennis Gregorovic

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Introduction

        The following is a requirements document for OpenACS 4 Subsites, part of the Index: openacs-4/packages/acs-core-docs/www/subsites.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/subsites.html 5 May 2004 12:36:07 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/subsites.html 11 Jun 2004 10:17:39 -0000 1.36 @@ -1,4 +1,4 @@ -Writing OpenACS Application Pages

        Writing OpenACS Application Pages

        By Rafael H. Schloming and Pete Su

        +Writing OpenACS Application Pages

        Writing OpenACS Application Pages

        By Rafael H. Schloming and Pete Su

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Overview

        Index: openacs-4/packages/acs-core-docs/www/tcl-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tcl-doc.html,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-core-docs/www/tcl-doc.html 5 May 2004 12:36:07 -0000 1.36 +++ openacs-4/packages/acs-core-docs/www/tcl-doc.html 11 Jun 2004 10:17:39 -0000 1.37 @@ -1,4 +1,4 @@ -Documenting Tcl Files: Page Contracts and Libraries

        Documenting Tcl Files: Page Contracts and Libraries

        By Jon Salz on 3 July 2000

        +Documenting Tcl Files: Page Contracts and Libraries

        Documenting Tcl Files: Page Contracts and Libraries

        By Jon Salz on 3 July 2000

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
        • Tcl procedures: /packages/acs-kernel/tcl-documentation-procs.tcl

        The Big Picture

        In versions of the OpenACS prior to 3.4, the standard Index: openacs-4/packages/acs-core-docs/www/templates.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/templates.html,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-core-docs/www/templates.html 5 May 2004 12:36:07 -0000 1.35 +++ openacs-4/packages/acs-core-docs/www/templates.html 11 Jun 2004 10:17:39 -0000 1.36 @@ -1,4 +1,4 @@ -Using Templates in OpenACS

        Using Templates in OpenACS

        By Pete Su

        +Using Templates in OpenACS

        Using Templates in OpenACS

        By Pete Su

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        Overview

        Index: openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 5 May 2004 12:36:07 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1,4 +1,4 @@ -Admin Pages

        Admin Pages

        +Admin Pages

        Admin Pages

        There are at least two flavors of admin user interface:

        • Admins use same pages as all other users, except that they are offered admin links and buttons where appropriate. @@ -9,24 +9,24 @@ access to data that users aren't interested in or aren't allowed to see you will need dedicated admin pages. The conventional place to put those dedicated admin pages is in the - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin directory. -

          [service0 www]$ mkdir admin
          [service0 www]$ cd admin

          +

          [$OPENACS_SERVICE_NAME www]$ mkdir admin
          [$OPENACS_SERVICE_NAME www]$ cd admin

          Even if your application doesn't need any admin pages of its own you will usually need at least one simple page with a bunch of links to existing administration UI such as Category Management or standard Parameters UI. Adding the link to Category Management is described in the section on categories. The listing below adds a link to the Parameters UI of our package. -

          [service0 admin]$ vi index.adp
          +      

          [$OPENACS_SERVICE_NAME admin]$ vi index.adp
           <master>
           <property name="title">@title;noquote@</property>
           <property name="context">@context;noquote@</property>
           
           <ul class="action-links">
             <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
           </ul>
          -
          [service0 admin]$ vi index.tcl
          +
          [$OPENACS_SERVICE_NAME admin]$ vi index.tcl
           ad_page_contract {} {
           } -properties {
               context_bar
          @@ -58,7 +58,7 @@
           

          In order to display the link to the admin page only to users that have admin privileges add the following code near the top of -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl: +/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.tcl:

           
           set package_id [ad_conn package_id]
          @@ -72,7 +72,7 @@
           }
           

          In -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp put: +/var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.adp put:

           <if @admin_p@ ne nil>
             <a href="@admin_url@">@admin_title@</a>
          Index: openacs-4/packages/acs-core-docs/www/tutorial-advanced.html
          ===================================================================
          RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-advanced.html,v
          diff -u -r1.21 -r1.22
          --- openacs-4/packages/acs-core-docs/www/tutorial-advanced.html	5 May 2004 12:36:07 -0000	1.21
          +++ openacs-4/packages/acs-core-docs/www/tutorial-advanced.html	11 Jun 2004 10:17:39 -0000	1.22
          @@ -1,4 +1,4 @@
          -Chapter�10.�Advanced Topics

          Chapter�10.�Advanced Topics

          by Joel Aufrecht

          +Chapter�10.�Advanced Topics

          Chapter�10.�Advanced Topics

          by Joel Aufrecht

          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

          This tutorial covers topics which are not essential to Index: openacs-4/packages/acs-core-docs/www/tutorial-categories.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-categories.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/tutorial-categories.html 5 May 2004 12:36:07 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-categories.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1,4 +1,4 @@ -Categories

          Categories

          You can associate any ACS Object with one or more categories. +Categories

          Categories

          You can associate any ACS Object with one or more categories. In this tutorial we'll show how to equip your application with user interface to take advantage of the Categories service.

          @@ -25,15 +25,15 @@

          The way to achieve this is is to provide a link to the Category Management pages. Add the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.tcl file:

           set category_map_url [export_vars -base \
               "[site_node::get_package_url -package_key categories]cadmin/one-object" \
                   { { object_id $package_id } }]
                     

          and the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/admin/index.adp file:

           <li><a href="@category_map_url@"
          @@ -114,7 +114,7 @@
           note_id and
           confirm_p.  If confirm_p is present,
           we delete the record, set redirection back to the index, and abort
          -script execution.

          The database commands:

          [service0@yourserver www]$ emacs note-delete.xql
          <?xml version="1.0"?>
          +script execution.

          The database commands:

          [$OPENACS_SERVICE_NAME@yourserver www]$ emacs note-delete.xql
          <?xml version="1.0"?>
           <queryset>
             <fullquery name="do_delete">
               <querytext>
          @@ -126,7 +126,7 @@
                 select samplenote__name(:note_id)
               </querytext>
             </fullquery>
          -</queryset>

          And the adp page:

          [service0@yourserver www]$ emacs note-delete.adp
          <master>
          +</queryset>

          And the adp page:

          [$OPENACS_SERVICE_NAME@yourserver www]$ emacs note-delete.adp
          <master>
           <property name="title">@title@</property>
           <property name="context">{@title@}</property>
           <h2>@title@</h2>
          @@ -135,4 +135,4 @@
           formtemplate tag outputs the HTML
           form generated by the ad_form command with the matching name.  Test it
                 by adding the new files in the APM and then deleting a few
          -      samplenotes.

        View comments on this page at openacs.org
        + samplenotes.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-comments.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-comments.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/tutorial-comments.html 5 May 2004 12:36:07 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-comments.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1,4 +1,4 @@ -Adding Comments

        Adding Comments

        You can track comments for any ACS Object. Here we'll track +Adding Comments

        Adding Comments

        You can track comments for any ACS Object. Here we'll track comments for notes. On the note-edit.tcl/adp pair, which is used to display individual notes, we want to put a link to add comments at the bottom of the screen. If there are any comments, we want to Index: openacs-4/packages/acs-core-docs/www/tutorial-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-cvs.html,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/tutorial-cvs.html 5 May 2004 12:36:07 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/tutorial-cvs.html 11 Jun 2004 10:17:39 -0000 1.12 @@ -1,21 +1,21 @@ -Add the new package to CVS

        Add the new package to CVS

        Before you do any more work, make sure that your work is +Add the new package to CVS

        Add the new package to CVS

        Before you do any more work, make sure that your work is protected by putting it all into cvs. The cvs add command is not recursive, so you'll have to traverse the directory tree manually and add as you go. (More on - CVS)

        [service0 xml]$ cd ..
        -[service0 doc]$ cd ..
        -[service0 www]$ cd ..
        -[service0 myfirstpackage]$ cd ..
        -[service0 packages]$ cvs add myfirstpackage/
        -Directory /cvsroot/service0/packages/myfirstpackage added to the repository
        -[service0 packages]$ cd myfirstpackage/
        -[service0 myfirstpackage]$ cvs add www
        -Directory /cvsroot/service0/packages/myfirstpackage/www added to the repository
        -[service0 myfirstpackage]$ cd www
        -[service0 www]$ cvs add doc
        -Directory /cvsroot/service0/packages/myfirstpackage/www/doc added to the repository
        -[service0 www]$ cd doc
        -[service0 doc]$ cvs add *
        +      CVS)

        [$OPENACS_SERVICE_NAME xml]$ cd ..
        +[$OPENACS_SERVICE_NAME doc]$ cd ..
        +[$OPENACS_SERVICE_NAME www]$ cd ..
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ cd ..
        +[$OPENACS_SERVICE_NAME packages]$ cvs add myfirstpackage/
        +Directory /cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage added to the repository
        +[$OPENACS_SERVICE_NAME packages]$ cd myfirstpackage/
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ cvs add www
        +Directory /cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www added to the repository
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ cd www
        +[$OPENACS_SERVICE_NAME www]$ cvs add doc
        +Directory /cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/doc added to the repository
        +[$OPENACS_SERVICE_NAME www]$ cd doc
        +[$OPENACS_SERVICE_NAME doc]$ cvs add *
         cvs add: cannot add special file `CVS'; skipping
         cvs add: scheduling file `admin-guide.html' for addition
         cvs add: scheduling file `bi01.html' for addition
        @@ -38,24 +38,24 @@
         cvs add: scheduling file `user-guide.html' for addition
         cvs add: scheduling file `user-interface.dia' for addition
         cvs add: scheduling file `user-interface.png' for addition
        -Directory /cvsroot/service0/packages/myfirstpackage/www/doc/xml added to the repository
        +Directory /cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/doc/xml added to the repository
         cvs add: use 'cvs commit' to add these files permanently
        -[service0 doc]$ cd xml
        -[service0 xml]$ cvs add Makefile index.xml
        +[$OPENACS_SERVICE_NAME doc]$ cd xml
        +[$OPENACS_SERVICE_NAME xml]$ cvs add Makefile index.xml
         cvs add: scheduling file `Makefile' for addition
         cvs add: scheduling file `index.xml' for addition
         cvs add: use 'cvs commit' to add these files permanently
        -[service0 xml]$ cd ../../..
        -[service0 myfirstpackage]$ cvs commit -m "new package"
        +[$OPENACS_SERVICE_NAME xml]$ cd ../../..
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ cvs commit -m "new package"
         cvs commit: Examining .
         cvs commit: Examining www
         cvs commit: Examining www/doc
         cvs commit: Examining www/doc/xml
        -RCS file: /cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v
        +RCS file: /cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/doc/admin-guide.html,v
         done
         Checking in www/doc/admin-guide.html;
        -/cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v  <--  admin-guide.html
        +/cvsroot/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www/doc/admin-guide.html,v  <--  admin-guide.html
         initial revision: 1.1
         done
         (many lines omitted)
        -[service0 myfirstpackage]$

        Figure�10.1.�Upgrading a local CVS repository

        Upgrading a local CVS repository
        View comments on this page at openacs.org
        +[$OPENACS_SERVICE_NAME myfirstpackage]$

        Figure�10.1.�Upgrading a local CVS repository

        Upgrading a local CVS repository
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-database.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-database.html,v diff -u -r1.28 -r1.29 --- openacs-4/packages/acs-core-docs/www/tutorial-database.html 5 May 2004 12:36:07 -0000 1.28 +++ openacs-4/packages/acs-core-docs/www/tutorial-database.html 11 Jun 2004 10:17:39 -0000 1.29 @@ -1,7 +1,7 @@ -Setting Up Database Objects

        Setting Up Database Objects

        by Joel Aufrecht

        +Setting Up Database Objects

        Setting Up Database Objects

        by Joel Aufrecht

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        Code the data model

        We create all database objects with scripts in the +

        Code the data model

        We create all database objects with scripts in the myfirstpackage/sql/ directory. All database scripts are database-specific and are thus in either the myfirstpackage/sql/oracle or @@ -31,13 +31,13 @@ repository functions to simplify our database creation. (More information about ACS Objects. More information about the Content Repository.) -

        Figure�9.2.�Tutorial Data Model

        Tutorial Data Model

        The top of each sql file has some +

        Figure�9.2.�Tutorial Data Model

        Tutorial Data Model

        The top of each sql file has some standard comments, including doc tags such as @author which will be picked up by the API browser. The string $Id$ will automatically be - expanded when the file is checked in to cvs.

        [service0 ~]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/sql/postgresql
        -[service0 postgresql]$ emacs myfirstpackage-create.sql

        Paste the text below into the file, save, and close.

        Figure�9.3.�The Database Creation Script

        -- creation script
        +      expanded when the file is checked in to cvs.

        [$OPENACS_SERVICE_NAME ~]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/sql/postgresql
        +[$OPENACS_SERVICE_NAME postgresql]$ emacs myfirstpackage-create.sql

        Paste the text below into the file, save, and close.

        Figure�9.3.�The Database Creation Script

        -- creation script
         --
         -- @author joel@aufrecht.org
         -- @cvs-id &Id:$
        @@ -61,7 +61,7 @@
             object.  Notice the use of "mfp."  This is derived from "My
             First Package" and ensures that our object is unlikely to conflict
             with objects from other packages.

        Create a database file to drop everything if the package is uninstalled.

        -[service0 postgresql]$ emacs myfirstpackage-drop.sql

        Figure�9.4.�Database Deletion Script

        -- drop script
        +[$OPENACS_SERVICE_NAME postgresql]$ emacs myfirstpackage-drop.sql

        Figure�9.4.�Database Deletion Script

        -- drop script
         --
         -- @author joel@aufrecht.org
         -- @cvs-id &Id:$
        @@ -73,20 +73,19 @@
         	   't',
         	   't'
             );
        -
        - (like the creation script the drop script calls a PL/pgSQL function: content_type__drop_type

        Run the create script manually to add your tables and functions.

        [service0 postgresql]$ psql -f myfirstpackage-create.sql
        +

        (like the creation script the drop script calls a PL/pgSQL function: content_type__drop_type

        Run the create script manually to add your tables and functions.

        [$OPENACS_SERVICE_NAME postgresql]$ psql -f myfirstpackage-create.sql
         psql:myfirstpackage-create.sql:15: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'mfp_notes_pkey' for table 'mfp_notes'
         psql:myfirstpackage-create.sql:15: NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
          content_type__create_type
         ---------------------------
                                  0
         (1 row)
         
        -[service0 postgresql]$

        If there are errors, use them to debug the sql file and try again. If there are errors in the database table creation, you may need to run the drop script to drop the table so that you can recreate it. The drop script will probably have errors since some of the things it's trying to drop may be missing. They can be ignored.

        Once you get the same output as shown above, test the drop script:

        [service0 postgresql]$ psql -f myfirstpackage-drop.sql
        +[$OPENACS_SERVICE_NAME postgresql]$

        If there are errors, use them to debug the sql file and try again. If there are errors in the database table creation, you may need to run the drop script to drop the table so that you can recreate it. The drop script will probably have errors since some of the things it's trying to drop may be missing. They can be ignored.

        Once you get the same output as shown above, test the drop script:

        [$OPENACS_SERVICE_NAME postgresql]$ psql -f myfirstpackage-drop.sql
         
          content_type__drop_type
         -------------------------
                                0
         (1 row)
         
        -[service0 postgresql]$

        Once both scripts are working without errors, run the create script one last time and proceed.

        [service0 postgresql]$ psql -f myfirstpackage-create.sql
        View comments on this page at openacs.org
        +[$OPENACS_SERVICE_NAME postgresql]$

        Once both scripts are working without errors, run the create script one last time and proceed.

        [$OPENACS_SERVICE_NAME postgresql]$ psql -f myfirstpackage-create.sql
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-debug.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-debug.html,v diff -u -r1.28 -r1.29 --- openacs-4/packages/acs-core-docs/www/tutorial-debug.html 5 May 2004 12:36:07 -0000 1.28 +++ openacs-4/packages/acs-core-docs/www/tutorial-debug.html 11 Jun 2004 10:17:39 -0000 1.29 @@ -1,41 +1,41 @@ -Debugging and Automated Testing

        Debugging and Automated Testing

        by Joel Aufrecht

        +Debugging and Automated Testing

        Debugging and Automated Testing

        by Joel Aufrecht

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        Debugging

        Developer Support.�The Developer Support package adds several goodies: debug +

        Debugging

        Developer Support.�The Developer Support package adds several goodies: debug information for every page; the ability to log comments to the page instead of the error log, and fast user switching so that you can test pages as anonymous and as dummy users without logging in and out.

        PostgreSQL.�You can work directly with the database to do debugging steps like looking directly at tables and testing stored procedures. Start emacs. Type M-x sql-postgres. Press enter for - server name and use service0 for + server name and use $OPENACS_SERVICE_NAME for database name. You can use C-(up arrow) and C-(down arrow) for command history.

        Hint: "Parse error near *" usually means that an xql file wasn't recognized, because the tcl file is choking on the *SQL* placeholder that it falls back on.

        Watching the server log.�

        To set up real-time monitoring of the AOLserver error - log, type

        less /var/lib/aolserver/service0/log/openacs-dev-error.log

        + log, type

        less /var/lib/aolserver/$OPENACS_SERVICE_NAME/log/openacs-dev-error.log

        F�to�show�new�log�entries�in�real�time�(like�tail�-f)
        C-c�to�stop�and�F�to�start�it�up�again.�
        G�goes�to�the�end.
        ?�searches�backward�
        /�searches�forward.�
        ����������

        -

        Manual testing

        Make a list of basic tests to make sure it works

        Test NumActionExpected Result
        001Browse to the index page while not logged in and +

        Manual testing

        Make a list of basic tests to make sure it works

        Test NumActionExpected Result
        001Browse to the index page while not logged in and while one or more notes exist.No edit or delete or add links should appear.
        002Browse to the index page while logged in. An Edit link should appear. Click on it. Fill out the form and click Submit.The text added in the form should be visible on the index page.
        API-001Invoke mfp::note::create with a specific word as the title.Proc should return an object id.
        API-002Given an object id from API-001, invoke mfp::note::get.Proc should return the specific word in the title.
        API-003Given the object id from API-001, invoke mfp::note::delete.Proc should return 0 for success.

        Other things to test: try to delete someone else's note. Try to delete your own note. Edit your own note. - Search for a note.

        Write automated tests

        by Simon Carstensen and Joel Aufrecht

        + Search for a note.

        Write automated tests

        by Simon Carstensen and Joel Aufrecht

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        +

        It seems to me that a lot of people have been asking for some guidelines on how to write automated tests. I've done several tests by now and have found the process to be extremely easy and useful. It's a joy to work with automated testing once you get the hang of it.

        Create the directory that will contain the test - script and edit the script file. The directory location and file name are standards which are recognized by the automated testing package:

        [service0 www]$ mkdir /var/lib/aolserver/service0/packages/myfirstpackage/tcl/test
        -[service0 www]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/tcl/test
        -[service0 test]$ emacs myfirstpackages-procs.tcl

        Write the tests. This is obviously the big step :) The script should first call ad_library like any normal -procs.tcl file:

        ad_library {
        +    script and edit the script file.  The directory location and file name are standards which are recognized by the automated testing package:

        [$OPENACS_SERVICE_NAME www]$ mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/tcl/test
        +[$OPENACS_SERVICE_NAME www]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/tcl/test
        +[$OPENACS_SERVICE_NAME test]$ emacs myfirstpackages-procs.tcl

        Write the tests. This is obviously the big step :) The script should first call ad_library like any normal -procs.tcl file:

        ad_library {
             ...
         }
         

        To create a test case you call @@ -54,7 +54,7 @@ inserts, deletes, and updates will be rolled back once the test has been executed. A very useful feature. Instead of inserting bogus data like: set name "Simon", I tend to generate a random script in order avoid inserting a value that's already in the database:

        set name [ad_generate_random_string]
        -
        Here's how the test case looks so far:
        aa_register_case mfp_basic_test {
        +

        Here's how the test case looks so far:

        aa_register_case mfp_basic_test {
             My test
         } {
             aa_run_with_teardown \
        @@ -67,7 +67,7 @@
         goes inside -test_code {}.  We want to implement test case API-001, "Given an object id from API-001, invoke mfp::note::get.  Proc should return the specific word in the title."

               set name [ad_generate_random_string]
               set new_id [mfp::note::add -title $name]
        -      aa_true "Note add succeeded" [exists_and_not_null new_id]

        To test our simple case, we must load the test file into the system (just as with the /tcl file in the basic tutorial, since the file didn't exist when the system started, the system doesn't know about it.) To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage". Since we'll be changing it frequently, select "watch this file" on the next page. This will cause the system to check this file every time any page is requested, which is bad for production systems but convenient for developing. We can also add some aa_register_case flags to make it easier to run the test. The -procs flag, which indicates which procs are tested by this test case, makes it easier to find procs in your package that aren't tested at all. The -cats flag, setting categories, makes it easier to control which tests to run. The smoke test setting means that this is a basic test case that can and should be run any time you are doing any test. (a definition of "smoke test")

        Once the file is loaded, go to ACS Automated Testing and click on myfirstpackage. You should see your test case. Run it and examine the results.

        TCLWebtest tests

        API testing can only test part of our package - it doesn't test the code in our adp/tcl pairs. For this, we can use TCLwebtest. TCLwebtest must be installed for this test to work. This provides a library of functions that make it easy to call a page through HTTP, examine the results, and drive forms. TCLwebtest's functions overlap slightly with acs-automated-testing; see the example provided for one approach on integrating them.

        Example

        Now we can add the rest of the API tests, including a test with deliberately bad data. The complete test looks like:

        ad_library {
        +      aa_true "Note add succeeded" [exists_and_not_null new_id]

        To test our simple case, we must load the test file into the system (just as with the /tcl file in the basic tutorial, since the file didn't exist when the system started, the system doesn't know about it.) To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage". Since we'll be changing it frequently, select "watch this file" on the next page. This will cause the system to check this file every time any page is requested, which is bad for production systems but convenient for developing. We can also add some aa_register_case flags to make it easier to run the test. The -procs flag, which indicates which procs are tested by this test case, makes it easier to find procs in your package that aren't tested at all. The -cats flag, setting categories, makes it easier to control which tests to run. The smoke test setting means that this is a basic test case that can and should be run any time you are doing any test. (a definition of "smoke test")

        Once the file is loaded, go to ACS Automated Testing and click on myfirstpackage. You should see your test case. Run it and examine the results.

        TCLWebtest tests

        API testing can only test part of our package - it doesn't test the code in our adp/tcl pairs. For this, we can use TCLwebtest. TCLwebtest must be installed for this test to work. This provides a library of functions that make it easy to call a page through HTTP, examine the results, and drive forms. TCLwebtest's functions overlap slightly with acs-automated-testing; see the example provided for one approach on integrating them.

        Example

        Now we can add the rest of the API tests, including a test with deliberately bad data. The complete test looks like:

        ad_library {
             Test cases for my first package.
         }
         
        Index: openacs-4/packages/acs-core-docs/www/tutorial-distribute.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-distribute.html,v
        diff -u -r1.11 -r1.12
        --- openacs-4/packages/acs-core-docs/www/tutorial-distribute.html	5 May 2004 12:36:07 -0000	1.11
        +++ openacs-4/packages/acs-core-docs/www/tutorial-distribute.html	11 Jun 2004 10:17:39 -0000	1.12
        @@ -1,10 +1,10 @@
        -Prepare the package for distribution.

        Prepare the package for distribution.

        Browse to the package manager. Click on +Prepare the package for distribution.

        Prepare the package for distribution.

        Browse to the package manager. Click on tutorialapp.

        Click on Generate a distribution file for this package from the filesystem.

        Click on the file size (37.1KB) after the label Distribution File: and save the file to - /tmp.

        + /tmp.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html 5 May 2004 12:36:07 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html 11 Jun 2004 10:17:39 -0000 1.5 @@ -1,4 +1,4 @@ -Future Topics

        Future Topics

        • How to enforce security so that users can't +Future Topics

          Future Topics

          • How to enforce security so that users can't change other users records

          • How to use the content management tables so that ... what?

          • How to change the default stylesheets for Form Builder HTML forms.

          • How to make your package searchable with OpenFTS/Oracle

          • How to prepare pagelets for inclusion in other pages

          • How and when to put procedures in a tcl procedure library

          • More on ad_form - data validation, other stuff. Index: openacs-4/packages/acs-core-docs/www/tutorial-hierarchical.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-hierarchical.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-hierarchical.html 11 Jun 2004 10:17:39 -0000 1.1 @@ -0,0 +1,79 @@ +Hierarchical data

            Hierarchical data

            by Jade Rubick + with help from many people in the OpenACS community

            + OpenACS docs are written by the named authors, and may be edited + by OpenACS documentation staff. +

            One of the nice things about using the OpenACS object system + is that it has a built-in facility for tracking hierarchical data + in an efficient way. The algorithm behind this is called + tree_sortkey.

            Any time your tables are subclasses of the acs_objects + table, then you automatically get the ability to structure them + hierarchically. The way you do this is currently via the + context_id column of + acs_objects (Note that there is talk of adding in a + parent_id column instead, because + the use of context_id has been + ambiguous in the past). So when you want to build your hierarchy, + simply set the context_id values. Then, when you want to make + hierarchical queries, you can do them as follows:

            +      db_multirow categories blog_categories "
            +      SELECT
            +      c.*,
            +      o.context_id,
            +      tree_level(o.tree_sortkey)
            +      FROM
            +      blog_categories c,
            +      acs_objects o
            +      WHERE
            +      c.category_id = o.object_id
            +      ORDER BY
            +      o.tree_sortkey"
            +    

            Note the use of the + tree_level() function, which + gives you the level, starting from 1, 2, 3...

            Here's an example, pulling all of the children for a given + parent:

            +      SELECT 
            +      children.*,
            +      tree_level(children.tree_sortkey) -
            +        tree_level(parent.tree_sortkey) as level
            +      FROM 
            +      some_table parent, 
            +      some_table children
            +      WHERE 
            +      children.tree_sorktey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
            +      and parent.tree_sortkey <> children.tree_sortkey
            +      and parent.key = :the_parent_key;
            +      

            The reason we substract the parent's tree_level from the + child's tree_level is that the tree_levels are global, so if you + want the parent's tree_level to start with 0, you'll want the + subtraction in there. This is a reason you'll commonly see magic + numbers in tree_sortkey SQL queries, like + tree_level(children.tree_sortkey) - + 4. That is basically an incorrect way to do it, + and subtracting the parent's tree_level is the preferred method.

            This example does not include the parent. To return the entire subtree including the parent, leave out the non-equals clause:

            +      SELECT
            +      subtree.*,
            +      tree_level(children.tree_sortkey) -
            +        tree_level(parent.tree_sortkey) as level
            +      FROM some_table parent, some_table subtree
            +      WHERE 
            +      subtree.tree_sorktey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
            +      and parent.key = :the_parent_key;
            +    

            If you are using the Content Repository, you get a similar + facility, but the parent_id + column is already there. Note you can do joins with + tree_sortkey:

            +      SELECT
            +      p.item_id,
            +      repeat(:indent_pattern, (tree_level(p.tree_sortkey) - 5)* :indent_factor) as indent,
            +      p.parent_id as folder_id,
            +      p.project_name
            +      FROM pm_projectsx p, cr_items i
            +      WHERE p.project_id = i.live_revision
            +      ORDER BY i.tree_sortkey
            +    

            This rather long thread explains How + tree_sortkeys work and this paper describes + the technique for tree_sortkeys, although the OpenACS + implementation has a few differences in the + implementation, to make it work for many languages and the + LIKE construct in Postgres. +

            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 5 May 2004 12:36:07 -0000 1.29 +++ openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 11 Jun 2004 10:17:39 -0000 1.30 @@ -1,7 +1,7 @@ -Creating an Application Package

            Creating an Application Package

            by Joel Aufrecht

            +Creating an Application Package

            Creating an Application Package

            by Joel Aufrecht

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

            The intended page map

            Overview

            To start developing new code in OpenACS, we build a new package. A package +

            The intended page map

            Overview

            To start developing new code in OpenACS, we build a new package. A package is a a discrete collection of web pages, tcl code, and database tables and procedures. A package with user interface is called an application; a package which provides functions to other packages and has no direct interface, a @@ -17,11 +17,11 @@ right now. Code that is temporary hackage is clearly marked.

            In this tutorial, we will make an application package for displaying a list of text notes. -

            Before you begin

            You will need:

            • A computer with a working installation of +

            Before you begin

            You will need:

            • A computer with a working installation of OpenACS. If you don't have this, see Chapter�2, Installation Overview.

            • Example files, which are included in the standard OpenACS 5.2.0d1 distribution. -

            Figure�9.1.�Assumptions in this section

            Fully qualified domain name of your serveryourserver.test
            URL of your serverhttp://yourserver.test:8000
            Name of development accountservice0
            New Package keymyfirstpackage

            Use the APM to initialize a new package

            We use the ACS Package Manager (APM) to add, remove, and +

          Figure�9.1.�Assumptions in this section

          Fully qualified domain name of your serveryourserver.test
          URL of your serverhttp://yourserver.test:8000
          Name of development account$OPENACS_SERVICE_NAME
          New Package keymyfirstpackage

          Use the APM to initialize a new package

          We use the ACS Package Manager (APM) to add, remove, and upgrade packages. It handles package meta-data, such as lists of files that belong in the package. Each package is uniquely identified by a package key. To start developing a new @@ -51,9 +51,9 @@

        At the bottom, click Create Package.

        This creates a package rooted at - /var/lib/aolserver/service0/packages/myfirstpackage. + /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage. This is the "home directory" of our new package, and all - files in the package will be within this directory.

        Add an Application Instance to the Server

        In order to see your work in progress, you must create a + files in the package will be within this directory.

        Add an Application Instance to the Server

        In order to see your work in progress, you must create a map between the URL space of incoming requests and the package application instance. You do this by adding the application in the main site administration). This creates a link between the incoming URL requests and an @@ -64,8 +64,8 @@ in this tutorial.

        1. Browse to http://yourserver.test:8000/admin/applications/application-add/.

        2. Choose "My First Package" from the list and click OK (the other fields are optional).

        By mounting the package, we've caused all requests to http://yourserver.test:8000/my-first-package - to be satisfied from the files at /var/lib/aolserver/service0/packages/myfirstpackage/www.

        Quick start

        The remainder of the tutorial walks you through each file one at a time as you create the package. You can skip all this, and get a working package, by doing the following:

        cd /var/lib/aolserver/service0/packages/acs-core-docs/www/files/tutorial
        -psql service0 -f myfirstpackage-create.sql
        +      to be satisfied from the files at /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www.

        Quick start

        The remainder of the tutorial walks you through each file one at a time as you create the package. You can skip all this, and get a working package, by doing the following:

        cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/tutorial
        +psql $OPENACS_SERVICE_NAME -f myfirstpackage-create.sql
         cp note-edit.* note-delete.tcl index.* ../../../../myfirstpackage/www/
         mkdir ../../../../myfirstpackage/lib
         cp note-list.* ../../../../myfirstpackage/lib/
        Index: openacs-4/packages/acs-core-docs/www/tutorial-notifications.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-notifications.html,v
        diff -u -r1.5 -r1.6
        --- openacs-4/packages/acs-core-docs/www/tutorial-notifications.html	5 May 2004 12:36:08 -0000	1.5
        +++ openacs-4/packages/acs-core-docs/www/tutorial-notifications.html	11 Jun 2004 10:17:39 -0000	1.6
        @@ -1,4 +1,4 @@
        -Notifications

        Notifications

        by David Bell and Simon Carstensen

        +Notifications

        Notifications

        by David Bell and Simon Carstensen

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

        The notifications package allows you to send notifications through any @@ -201,4 +201,4 @@ parameter is what appears at the end of the text returned (i.e. "... request notification</a> for pretty_name"), The url parameter should be set to the address we want the user to be redirected to after they have finished the subscription process.

        This should be all you need to implement a notification system. For more examples - look at the forums package.

        View comments on this page at openacs.org
        + look at the forums package.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-pages.html,v diff -u -r1.28 -r1.29 --- openacs-4/packages/acs-core-docs/www/tutorial-pages.html 5 May 2004 12:36:08 -0000 1.28 +++ openacs-4/packages/acs-core-docs/www/tutorial-pages.html 11 Jun 2004 10:17:39 -0000 1.29 @@ -1,8 +1,8 @@ -Creating Web Pages

        Creating Web Pages

        by Joel Aufrecht

        +Creating Web Pages

        Creating Web Pages

        by Joel Aufrecht

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        Install some API

        As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:

        -    cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/

        To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage".

        Page Map

        Our package will have two visible pages. The first shows a list of all objects; the second shows a single object in view or edit mode, and can also be used to add an object. The index page will display the list, but since we might reuse the list later, we'll put it in a seperate file and include it on the index page.

        Figure�9.5.�Page Map

        Page Map

        Build the "Index" page

        Each user-visible page in your package has, typically, +

        Install some API

        As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:

        +    cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/tcl/

        To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage".

        Page Map

        Our package will have two visible pages. The first shows a list of all objects; the second shows a single object in view or edit mode, and can also be used to add an object. The index page will display the list, but since we might reuse the list later, we'll put it in a seperate file and include it on the index page.

        Figure�9.5.�Page Map

        Page Map

        Build the "Index" page

        Each user-visible page in your package has, typically, three parts. The tcl file holds the procedural logic for the page, including TCL and database-independent SQL code, and does things like @@ -12,8 +12,8 @@ and -oracle.xql files contains database-specific SQL. The default page in any directory is index, so we'll build that - first, starting with the tcl file:

        [service0 postgresql]$ cd /var/lib/aolserver/service0/packages/myfirstpackages/www
        -[service0 www]$ emacs index.tcl

        Paste this into the file.

        ad_page_contract {
        +      first, starting with the tcl file:

        [$OPENACS_SERVICE_NAME postgresql]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackages/www
        +[$OPENACS_SERVICE_NAME www]$ emacs index.tcl

        Paste this into the file.

        ad_page_contract {
             This is the main page for the package.  It displays all of the Notes and provides links to edit them and to create new Notes.
         
             @author Your Name (you@example.com)
        @@ -24,9 +24,9 @@
         set context [list]

        Now index.adp:

        <master>
           <property name="title">@page_title;noquote@</property>
           <property name="context">@context;noquote@</property>
        -<include src="/packages/myfirstpackage/lib/note-list">

        You can test your work by viewing the page.

        The index page includes the list page, which we put in /lib instead of /www to designate that it's available for reuse by other packages.

        [service0 www]$ mkdir /var/lib/aolserver/service0/packages/myfirstpackage/lib
        -[service0 www]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/lib
        -[service0 lib]$ emacs note-list.tcl
        template::list::create \
        +<include src="/packages/myfirstpackage/lib/note-list">

        You can test your work by viewing the page.

        The index page includes the list page, which we put in /lib instead of /www to designate that it's available for reuse by other packages.

        [$OPENACS_SERVICE_NAME www]$ mkdir /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/lib
        +[$OPENACS_SERVICE_NAME www]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/lib
        +[$OPENACS_SERVICE_NAME lib]$ emacs note-list.tcl
        template::list::create \
             -name notes \
             -multirow notes \
             -actions { "Add a Note" note-edit} \
        @@ -63,9 +63,9 @@
             } {
         	set edit_url [export_vars -base "note-edit" {item_id}]
         	set delete_url [export_vars -base "note-delete" {item_id}]
        -    }
        [service0 lib]$ emacs note-list.adp
        <listtemplate name="notes"></listtemplate>

        Create the add/edit page. If note_id is passed in, - it display that note, and can change to edit mode if appropriate. Otherwise, it presents a form for adding notes.

        [service0 lib]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www
        -[service0 www]$ emacs note-edit.tcl
        ad_page_contract {
        +    }
        [$OPENACS_SERVICE_NAME lib]$ emacs note-list.adp
        <listtemplate name="notes"></listtemplate>

        Create the add/edit page. If note_id is passed in, + it display that note, and can change to edit mode if appropriate. Otherwise, it presents a form for adding notes.

        [$OPENACS_SERVICE_NAME lib]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www
        +[$OPENACS_SERVICE_NAME www]$ emacs note-edit.tcl
        ad_page_contract {
             This is the view-edit page for notes.
         
             @author Your Name (you@example.com)
        @@ -105,13 +105,13 @@
         } -after_submit {
             ad_returnredirect "."
             ad_script_abort
        -}
        [service0 www]$ emacs note-edit.adp
        <master>
        +}
        [$OPENACS_SERVICE_NAME www]$ emacs note-edit.adp
        <master>
           <property name="title">@page_title;noquote@</property>
           <property name="context">@context;noquote@</property>
           <property name="focus">note.title</property>
           
         <formtemplate id="note"></formtemplate>

        And the delete page. Since it has no UI, there is only a - tcl page, and no adp page.

        [service0 www]$ emacs note-delete.tcl
        ad_page_contract {
        +     tcl page, and no adp page.

        [$OPENACS_SERVICE_NAME www]$ emacs note-delete.tcl
        ad_page_contract {
             This deletes a note
         
             @author Your Name (you@example.com)
        Index: openacs-4/packages/acs-core-docs/www/tutorial-specs.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-specs.html,v
        diff -u -r1.3 -r1.4
        --- openacs-4/packages/acs-core-docs/www/tutorial-specs.html	5 May 2004 12:36:08 -0000	1.3
        +++ openacs-4/packages/acs-core-docs/www/tutorial-specs.html	11 Jun 2004 10:17:39 -0000	1.4
        @@ -1,4 +1,4 @@
        -Write the Requirements and Design Specs

        Write the Requirements and Design Specs

        Before you get started you should make yourself familiar with +Write the Requirements and Design Specs

        Write the Requirements and Design Specs

        Before you get started you should make yourself familiar with the tags that are used to write your documentation. For tips on editing SGML files in emacs, see OpenACS Documentation Guide.

        It's time to document. For the tutorial we'll use pre-written documentation. When creating a package @@ -12,12 +12,12 @@ directory, and store png or jpg versions of supporting files in the www/doc directory.

        For this tutorial, you should instead install the pre-written documentation files for the tutorial app. Log in - as service0, create the standard - directories, and copy the prepared documentation:

        [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/
        -[service0 myfirstpackage]$ mkdir -p www/doc/xml
        -[service0 myfirstpackage]$ cd www/doc/xml
        -[service0 xml]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/myfirstpackage/* .
        -[service0 xml]$

        OpenACS uses DocBook for documentation. DocBook is + as $OPENACS_SERVICE_NAME, create the standard + directories, and copy the prepared documentation:

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ mkdir -p www/doc/xml
        +[$OPENACS_SERVICE_NAME myfirstpackage]$ cd www/doc/xml
        +[$OPENACS_SERVICE_NAME xml]$ cp /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/myfirstpackage/* .
        +[$OPENACS_SERVICE_NAME xml]$

        OpenACS uses DocBook for documentation. DocBook is an XML standard for semantic markup of documentation. That means that the tags you use indicate meaning, not intended appearance. The style sheet will determine appearance. You @@ -32,7 +32,7 @@ is stored in the www/docs/ directory. A Makefile is provided to generate html from the xml, and copy all of the supporting files. If Docbook is set up correctly, all you need - to do is:

        [service0 xml]$ make
        +      to do is:

        [$OPENACS_SERVICE_NAME xml]$ make
         cd .. ; /usr/bin/xsltproc ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml
         Writing requirements-introduction.html for chapter(requirements-introduction)
         Writing requirements-overview.html for chapter(requirements-overview)
        @@ -48,5 +48,5 @@
         Writing admin-guide.html for chapter(admin-guide)
         Writing bi01.html for bibliography
         Writing index.html for book
        -[service0 xml]$

        Verify that the documentation was generated and reflects +[$OPENACS_SERVICE_NAME xml]$

        Verify that the documentation was generated and reflects your changes by browsing to http://yoursite:8000/myfirstpackage/doc

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial-vuh.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-vuh.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/tutorial-vuh.html 5 May 2004 12:36:08 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/tutorial-vuh.html 11 Jun 2004 10:17:39 -0000 1.6 @@ -1,5 +1,5 @@ -Using .vuh files for pretty urls

        Using .vuh files for pretty urls

        .Vuh files are special cases of .tcl files, used for rewriting incoming urls. We can use a vuh file to prettify the uri for our notes. Instead of note-edit?item_id=495, we can use note/495. To do this, we will need a new .vuh file for redirection and we will need to change the referring links in note-list. First, add the vuh:

        [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www
        -[service0 www]$ emacs note.vuh
        +Using .vuh files for pretty urls

        Using .vuh files for pretty urls

        .Vuh files are special cases of .tcl files, used for rewriting incoming urls. We can use a vuh file to prettify the uri for our notes. Instead of note-edit?item_id=495, we can use note/495. To do this, we will need a new .vuh file for redirection and we will need to change the referring links in note-list. First, add the vuh:

        [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/myfirstpackage/www
        +[$OPENACS_SERVICE_NAME www]$ emacs note.vuh
         

        Paste this into the file:

        # Transform requests of type: a/b
         # into this internal request: A?c=b
         # for example, note/495 > note-edit?item_id=496
        @@ -17,7 +17,7 @@
         set internal_path "/packages/[ad_conn package_key]/www/note-edit"
         
         rp_internal_redirect $internal_path
        -

        We parse the incoming request and treat everything after the final / as the item id. Note that this simple redirection will lose any additional query parameters passed in. Many OpenACS objects maintain a pretty-name, which is a unique, human-readable string, usually derived from title, which makes an even better 'pretty url' than a numeric id; this requires that your display page be able to look up an item based on pretty id.

        We use rp_form_put to store the item id in the internal register that the next page is expecting, and then redirects the request in process internally (ie, without a browser refresh).

        Next, modify note-list so that its link is of the new form.:

        [service0 www]$ emacs ../lib/note-edit.tcl
        +

        We parse the incoming request and treat everything after the final / as the item id. Note that this simple redirection will lose any additional query parameters passed in. Many OpenACS objects maintain a pretty-name, which is a unique, human-readable string, usually derived from title, which makes an even better 'pretty url' than a numeric id; this requires that your display page be able to look up an item based on pretty id.

        We use rp_form_put to store the item id in the internal register that the next page is expecting, and then redirects the request in process internally (ie, without a browser refresh).

        Next, modify note-list so that its link is of the new form.:

        [$OPENACS_SERVICE_NAME www]$ emacs ../lib/note-edit.tcl
         db_multirow \
             -extend {
         	edit_url
        @@ -36,4 +36,4 @@
             package. Commonly, you would use ad_conn package_url to build the
             URL. Otherwise, some of your links may be relative to the virtual
             directory (note/) instead of the actual directory that the note is
        -    being served from

        View comments on this page at openacs.org
        + being served from

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/tutorial.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial.html,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-core-docs/www/tutorial.html 5 May 2004 12:36:08 -0000 1.13 +++ openacs-4/packages/acs-core-docs/www/tutorial.html 11 Jun 2004 10:17:39 -0000 1.14 @@ -1 +1 @@ -Chapter�9.�Development Tutorial
        View comments on this page at openacs.org
        +Chapter�9.�Development Tutorial
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/unix-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/unix-installation.html,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/unix-installation.html 5 May 2004 12:36:08 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/unix-installation.html 11 Jun 2004 10:17:39 -0000 1.21 @@ -1,11 +1,6 @@ -Install a Unix-like system and supporting software

        Install a Unix-like system and supporting software

        by Joel Aufrecht

        +Install a Unix-like system and supporting software

        Install a Unix-like system and supporting software

        by Joel Aufrecht

        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

        a Unix-like system

        You will need a computer running a unix-like system with the following software installed:

        and optionally these programs, which are included in most distributions:

        To install a machine to the specifications of the Reference - Platform, do the walkthrough of the - Red Hat 8.0 Install for OpenACS.

        ($Id$)
        View comments on this page at openacs.org
        +

        a Unix-like system

        You will need a computer running a unix-like system with the following software installed:

        and optionally these programs, which are included in most distributions:

        In order to cut and paste the example code into your shell, you must first do Setting a global shell variable for cut and paste.

        To install a machine to the specifications of the Reference Platform, do the + walkthrough of the Red Hat 8.0 Install for OpenACS.

        ($Id$)
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/update-repository.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/update-repository.html,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/update-repository.html 5 May 2004 12:36:08 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/update-repository.html 11 Jun 2004 10:17:39 -0000 1.7 @@ -1,4 +1,4 @@ -How to Update the OpenACS.org repository

        How to Update the OpenACS.org repository

        1. +How to Update the OpenACS.org repository

          How to Update the OpenACS.org repository

          1. Setup a local OpenACS server running 5.0 or better.

          2. Edit packages/acs-admin/www/apm/build-repository.tcl and adjust the Configuration Settings.

          3. @@ -13,4 +13,14 @@ The files will be stored on the server's hard drive in the directory specified by the 'repository_dir' variable in the page script, by default "[acs_root_dir]/www/repository/".

        2. If you're on openacs.org, everything should now be fine. Otherwise, you need to move the entire directory tree to openacs.org:/web/openacs/www/repository, replacing what was already there. -

        View comments on this page at openacs.org
        +

        This is automated on OpenACS.org by having a dedicated site just for building the repository, invoked with this shell script. Since the page circumvents security checks for ease of use, the entire site is limited to local requests. The script is called daily with a cron job.

        #!/bin/sh
        +#set -x
        +
        +STATUS=`wget --output-document - http://127.0.0.1:8002/build-repository.tcl | grep DONE | wc -l`
        +
        +if [ $STATUS -eq "1" ]
        +    then
        +    rm -rf /web/openacs.org/www/repository.old
        +    mv /web/openacs.org/www/repository /web/openacs.org/www/repository.old
        +    cp -r /web/repository/www/repository /web/openacs.org/www/repository
        +fi
        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/update-translations.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/update-translations.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/update-translations.html 5 May 2004 12:36:08 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/update-translations.html 11 Jun 2004 10:17:39 -0000 1.6 @@ -1,4 +1,4 @@ -How to Update the translations

        How to Update the translations

        1. +How to Update the translations

          How to Update the translations

          1. Update the translation server. (Approach 1: upgrade to the last release; approach 2: upgrade to head or to an alpha or beta release.) Use CVS up.

            This approach puts the translation server at risk. An alternate approach would be to create a whole new checkout on the appropriate branch (such as oacs-5-0), point that at the live production database, import keys (which is safe because keys on the translation server take precedence), then export keys back, and then commit. This gets the keys committed to the right branch without changing the code running on the production site. Updating the production site can then be a seperate exercise.
          2. Go to ACS Lang admin page and click "Import All Messages"

          3. Resolve conflicts, if any, on the provided page.

          4. Back on the admin page, click the export link. If there are conflicts, the messages will be exported anyway and any errors will be shown in the web interface.

          5. From the packages dir, run the acs-lang/bin/check-catalog.sh script. (This checks for keys no longer in use and some other things. Until it is rolled into the UI, do it manually and check the results and take whatever steps you can intuit you should do.) Index: openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html 5 May 2004 12:36:08 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html 11 Jun 2004 10:17:39 -0000 1.13 @@ -1,11 +1,11 @@ -Upgrading 4.5 or higher to 4.6.3

            Upgrading 4.5 or higher to 4.6.3

            The required platform for OpenACS 4.6 is the same as +Upgrading 4.5 or higher to 4.6.3

            Upgrading 4.5 or higher to 4.6.3

            The required platform for OpenACS 4.6 is the same as 4.5, with the exception of OpenFTS. OpenACS 4.6 and later require OpenFTS 0.3.2 for full text search on PostGreSQL. If you have OpenFTS 0.2, you'll need to upgrade.

            If upgrading from 4.2, you need to manually run acs-kernel/sql/postgres/upgrade-4.2-4.5.sql. See Bug #632

            1. Make a Backup.�Back up the database and file system (see the section called “Manual backup and recovery”).

            2. OPTIONAL: Upgrade OpenFTS.�the section called “Upgrading OpenFTS from 0.2 to 0.3.2”

            3. Stop the server -

              [root root]# svc -d /service/service0
            4. Upgrade the file system.�the section called “Upgrading the OpenACS files”

            5. +

              [root root]# svc -d /service/$OPENACS_SERVICE_NAME
            6. Upgrade the file system.�the section called “Upgrading the OpenACS files”

            7. Start the server -

              [root root]# svc -u /service/service0
            8. Use APM to upgrade the database.�

              1. Browse to the package manager, http://yourserver/acs-admin/apm.

              2. Click Install packages.

              3. Select the packages you want to install. This should +

                [root root]# svc -u /service/$OPENACS_SERVICE_NAME
              4. Use APM to upgrade the database.�

                1. Browse to the package manager, http://yourserver/acs-admin/apm.

                2. Click Install packages.

                3. Select the packages you want to install. This should be everything that says upgrade, plus any new packages you want. It's safest to upgrade the kernel by itself, and then come back and upgrade the rest of the - desired packages in a second pass.

                4. On the next screen, click Install Packages

                5. When prompted, restart the server:

                  [root root]# restart-aolserver service0
                6. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

                7. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.2.0d1.

              5. Rollback.�If anything goes wrong, roll back to the backup snapshot.

            View comments on this page at openacs.org
            + desired packages in a second pass.

          6. On the next screen, click Install Packages

          7. When prompted, restart the server:

            [root root]# restart-aolserver $OPENACS_SERVICE_NAME
          8. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

          9. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.2.0d1.

        2. Rollback.�If anything goes wrong, roll back to the backup snapshot.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/upgrade-4.6.3-to-5.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-4.6.3-to-5.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/upgrade-4.6.3-to-5.html 5 May 2004 12:36:08 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/upgrade-4.6.3-to-5.html 11 Jun 2004 10:17:39 -0000 1.3 @@ -1,23 +1,23 @@ -Upgrading OpenACS 4.6.3 to 5.0

        Upgrading OpenACS 4.6.3 to 5.0

        • Oracle.�Not yet documented. It should be possible to upgrade via the APM just as when upgrading to 4.6.3.

        • PostGreSQL.�You must use PostGreSQL 7.3.x or newer to upgrade OpenACS beyond 4.6.3. See Upgrade PostGreSQL to 7.3; Table�2.2, “Version Compatibility Matrix” -

          1. Back up the database and file system.

          2. Upgrade the file system for packages/acs-kernel.�the section called “Upgrading the OpenACS files”

          3. Upgrade the kernel manually. (There is a script to do most of the rest: /contrib/misc/upgrade_4.6_to_5.0.sh on HEAD). You'll still have to do a lot of stuff manually, but automated trial and error is much more fun.)

            [root root]# su - service0
            -[service0 aolserver]$ cd /var/lib/aolserver/ service0/packages/acs-kernel/sql/postgresql/upgrade

            - Manually execute each of the upgrade scripts in sequence, either from within psql or from the command line with commands such as psql -f upgrade-4.6.3-4.6.4.sql service0. Run the scripts in this order (order is tentative, not verified): -

            psql -f upgrade-4.6.3-4.6.4.sql service0
            -psql -f upgrade-4.6.4-4.6.5.sql service0
            -psql -f upgrade-4.6.5-4.6.6.sql service0
            -psql -f upgrade-4.7d-4.7.2d.sql service0
            -psql -f upgrade-4.7.2d-5.0d.sql service0
            -psql -f upgrade-5.0d-5.0d2.sql service0
            -psql -f upgrade-5.0d2-5.0d3.sql service0
            -psql -f upgrade-5.0d6-5.0d7.sql service0
            -psql -f upgrade-5.0d7-5.0d9.sql service0
            -psql -f upgrade-5.0d11-5.0d12.sql service0
            -psql -f upgrade-5.0.0a4-5.0.0a5.sql service0
            -psql -f upgrade-5.0.0b1-5.0.0b2.sql service0
            -psql -f upgrade-5.0.0b2-5.0.0b3.sql service0
            -psql -f upgrade-5.0.0b3-5.0.0b4.sql service0
          4. Upgrade ACS Service Contracts manually:

            [service0 aolserver]$ cd /var/lib/aolserver/ service0/packages/acs-service-contracts/sql/postgresql/upgrade
            -psql -f upgrade-4.7d2-4.7d3.sql service0
            -
          5. Load acs-authentication data model.

            psql -f /var/lib/aolserver/service0/openacs-5/packages/acs-authentication/sql/postgresql/acs-authentication-create.sql service0
          6. Load acs-lang data model.

            psql -f /var/lib/aolserver/service0/packages/acs-lang/sql/postgresql/acs-lang-create.sql service0
          7. (This step may overlap with the two previous steps, but I think it's harmless?) Create a file which will be executed on startup which takes care of a few issues with authentication and internationalization: create service0/tcl/zzz-postload.tcl containing:

            if {![apm_package_installed_p acs-lang]} {
            +Upgrading OpenACS 4.6.3 to 5.0

            Upgrading OpenACS 4.6.3 to 5.0

            • Oracle.�Not yet documented. It should be possible to upgrade via the APM just as when upgrading to 4.6.3.

            • PostGreSQL.�You must use PostGreSQL 7.3.x or newer to upgrade OpenACS beyond 4.6.3. See Upgrade PostGreSQL to 7.3; Table�2.2, “Version Compatibility Matrix” +

              1. Back up the database and file system.

              2. Upgrade the file system for packages/acs-kernel.�the section called “Upgrading the OpenACS files”

              3. Upgrade the kernel manually. (There is a script to do most of the rest: /contrib/misc/upgrade_4.6_to_5.0.sh on HEAD). You'll still have to do a lot of stuff manually, but automated trial and error is much more fun.)

                [root root]# su - $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver/ $OPENACS_SERVICE_NAME/packages/acs-kernel/sql/postgresql/upgrade

                + Manually execute each of the upgrade scripts in sequence, either from within psql or from the command line with commands such as psql -f upgrade-4.6.3-4.6.4.sql $OPENACS_SERVICE_NAME. Run the scripts in this order (order is tentative, not verified): +

                psql -f upgrade-4.6.3-4.6.4.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-4.6.4-4.6.5.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-4.6.5-4.6.6.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-4.7d-4.7.2d.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-4.7.2d-5.0d.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0d-5.0d2.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0d2-5.0d3.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0d6-5.0d7.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0d7-5.0d9.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0d11-5.0d12.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0.0a4-5.0.0a5.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0.0b1-5.0.0b2.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0.0b2-5.0.0b3.sql $OPENACS_SERVICE_NAME
                +psql -f upgrade-5.0.0b3-5.0.0b4.sql $OPENACS_SERVICE_NAME
              4. Upgrade ACS Service Contracts manually:

                [$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver/ $OPENACS_SERVICE_NAME/packages/acs-service-contracts/sql/postgresql/upgrade
                +psql -f upgrade-4.7d2-4.7d3.sql $OPENACS_SERVICE_NAME
                +
              5. Load acs-authentication data model.

                psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/openacs-5/packages/acs-authentication/sql/postgresql/acs-authentication-create.sql $OPENACS_SERVICE_NAME
              6. Load acs-lang data model.

                psql -f /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-lang/sql/postgresql/acs-lang-create.sql $OPENACS_SERVICE_NAME
              7. (This step may overlap with the two previous steps, but I think it's harmless?) Create a file which will be executed on startup which takes care of a few issues with authentication and internationalization: create $OPENACS_SERVICE_NAME/tcl/zzz-postload.tcl containing:

                if {![apm_package_installed_p acs-lang]} {
                 apm_package_install -enable -mount_path acs-lang [acs_root_dir]/packages/acs-lang/acs-lang.info
                 lang::catalog::import -locales [list "en_US"]
                 }
                @@ -34,4 +34,11 @@
                 parameter::set_value -package_id [ad_acs_kernel_id] -parameter UsePasswordWidgetForUsername -value 0
                 }
              8. If you can login, visit /acs-admin/apm and upgrade acs-kernel and acs-service-contract and uncheck the data model scripts. Restart. If everything is still working, make another backup of the database.

              9. Upgrade other packages via the APM

              - See also these forum posts: Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results, OpenACS 5.0 Upgrade Experiences.

            View comments on this page at openacs.org
            + See also these forum posts: Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results, OpenACS 5.0 Upgrade Experiences.

            + There are a few things you might want to do once you've + upgraded. First, the acs-kernel parameters need to be set to + allow HREF and IMG tags, if you want users who can edit HTML + to be able to insert HREF and IMG tags. Also, you might need + to set the default language for your site. See the above + link on OpenACS 5.0 Upgrade Experiences for details. +

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/upgrade-5-0-dot.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-5-0-dot.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/upgrade-5-0-dot.html 5 May 2004 12:36:08 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/upgrade-5-0-dot.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1 +1 @@ -Upgrading 5.0.0 to 5.0.x

        Upgrading 5.0.0 to 5.0.x

        • Upgrading a stock site.�If you have no custom code, and your site is not in a CVS repository, upgrade with these steps:

          1. Go to /acs-admin/install/ and click "Upgrade Your System" in "Install from OpenACS Repository"

          2. Select all of the packages you want to upgrade and proceed

          3. After upgrade is complete, restart the server as indicated.

          4. If you are using locales other than en_US, go to acs-lang/admin and "Import all Messages" to load the new translated messages. Your local translations, if any, will take precedence over imported translations.

        • Upgrading a Custom or CVS site.�If you have custom code, and your site is in a CVS repository, upgrade with these steps:

          1. Upgrade the file system for all packages in use.�the section called “Upgrading the OpenACS files”

          2. Go to /acs-admin/install/ and click "Upgrade Your System" in "Install from local file system"

          3. Select all of the packages you want to upgrade and proceed

          4. After upgrade is complete, restart the server as indicated.

          5. If you are using locales other than en_US, go to acs-lang/admin and "Import all Messages" to load the new translated messages. Your local translations, if any, will take precedence over imported translations.

        View comments on this page at openacs.org
        +Upgrading 5.0.0 to 5.0.x

        Upgrading 5.0.0 to 5.0.x

        • Upgrading a stock site.�If you have no custom code, and your site is not in a CVS repository, upgrade with these steps:

          1. Go to /acs-admin/install/ and click "Upgrade Your System" in "Install from OpenACS Repository"

          2. Select all of the packages you want to upgrade and proceed

          3. After upgrade is complete, restart the server as indicated.

          4. If you are using locales other than en_US, go to acs-lang/admin and "Import all Messages" to load the new translated messages. Your local translations, if any, will take precedence over imported translations.

        • Upgrading a Custom or CVS site.�If you have custom code, and your site is in a CVS repository, upgrade with these steps:

          1. Upgrade the file system for all packages in use.�the section called “Upgrading the OpenACS files”

          2. Go to /acs-admin/install/ and click "Upgrade Your System" in "Install from local file system"

          3. Select all of the packages you want to upgrade and proceed

          4. After upgrade is complete, restart the server as indicated.

          5. If you are using locales other than en_US, go to acs-lang/admin and "Import all Messages" to load the new translated messages. Your local translations, if any, will take precedence over imported translations.

        View comments on this page at openacs.org
        Index: openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html 5 May 2004 12:36:08 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html 11 Jun 2004 10:17:39 -0000 1.13 @@ -1,55 +1,62 @@ -Upgrading the OpenACS files

        Upgrading the OpenACS files

        OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.

        Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

        • Upgrading files for a site which is not in a CVS repository.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

          [root root]# su - service0
          -[service0 aolserver]$ cd /var/lib/aolserver
          -[service0 web]$ tar xzf /tmp/openacs-4-6.tgz
          -[service0 web]$ cp -r openacs-4-6/* openacs-4
          -[service0 openacs-upgrade]$ exit
          +Upgrading the OpenACS files

          Upgrading the OpenACS files

          OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.

          Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 5.1 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

          • Upgrading files for a site which is not in a CVS repository.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

            [root root]# su - $OPENACS_SERVICE_NAME
            +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver
            +[$OPENACS_SERVICE_NAME web]$ tar xzf /tmp/openacs-5-1.tar.gz
            +[$OPENACS_SERVICE_NAME web]$ cp -r openacs-5-1/* openacs-4
            +[$OPENACS_SERVICE_NAME openacs-upgrade]$ exit
             [root root]#
            -su - service0
            +su - $OPENACS_SERVICE_NAME
             cd /var/lib/aolserver
            -tar xzf /tmp/openacs-4-6.tgz
            -cp -r openacs-4-6/* openacs-4
            +tar xzf /tmp/openacs-5-1.tgz
            +cp -r openacs-5-1/* openacs-4
             exit
          • Upgrading files for a site in a private CVS repository -

            Figure�5.2.�Upgrading a local CVS repository

            Upgrading a local CVS repository
            • Step 1: Import new CVS code.�There are two common ways to get new OpenACS code into your local CVS repository - via tarball or with a working CVS checkout of OpenACS. Both methods work well for starting your local repository; the second method is better for incremental additions or upgrades.

              • (a): via tarball.�Download a current tarball and unpack the new files into a working directory.

                [root root]# su - service0
                -[service0 aolserver]$ cd /tmp
                -[service0 tmp]$ tar xzf openacs-4-6.tgz
                -[service0 tmp]$ cd openacs-4.6
              • (b): via cvs working checkout.�Create a CVS checkout from OpenACS. The first time you do this, you will need to create the checkout directory. We use one dedicated directory for each branch of OpenACS - if you are using OpenACS 5.0,x, you only need an OpenACS 5.0 branch. The openacs-5-0-compat tag identifies the latest released version of OpenACS 5.0 (ie, 5.0.3 or 5.0.4) and the latest compatible version of each package, including .LRN. Each minor release of OpenACS since 5.0 has this tagging structure. (Ie., OpenACS 5.1.x has openacs-5-1-compat.)

                [root root]# su - service0
                -[service0 aolserver]$ cd /var/lib/aolserver
                -[service0 aolserver]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot checkout -r openacs-5-0-compat openacs-4
                -[service0 aolserver]$ mv openacs-4 openacs-5-0

                If this checkout already exists, you can simply update it instead of recreating it.

                [root root]# su - service0
                -[service0 aolserver]$ cd /var/lib/aolserver/openacs-5-0
                -[service0 aolserver]$ cvs up -Pd
              • (c) A single package via cvs working checkout.�You can add or upgrade a single package at a time, if you already have a cvs working directory.

                [root root]# su - service0
                -[service0 aolserver]$ cd /var/lib/aolserver/openacs-5-0
                -[service0 openacs-5-0]$ cvs up -d myfirstpackage

                In the next section, the import must be tailored to just this package.

            • Step 2: Merge New OpenACS code.�Now that you have a local copy of the new OpenACS code, you need to import it into your local CVS repository and resolve any conflicts that occur.

              Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.

              [service0 openacs-4.6]$  cvs -d /var/lib/cvs import -m "upgrade to OpenACS 4.6" openacs OpenACS openacs-4-6

              Tip

              If adding or upgrading a single package, run the cvs import from within the base directory of that package, and adjust the cvs command accordingly. In this example, we are adding the myfirstpackage package.

              [root root]# su - service0
              -[service0 aolserver]$ cd /var/lib/aolserver/openacs-5-0/packagse/myfirstpackage
              -[service0 myfirstpackage]$ cvs -d /var/lib/cvs/ import -m "importing package" service0/packages/myfirstpackage

              Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.

              [service0 openacs-4.6]$  cd /var/lib/aolserver
              -[service0 tmp]$ mkdir service0-upgrade
              -[service0 tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
              -(CVS feedback here)
              -

              The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.

              Once you've fixed any conflicts, commit the new code - to your local tree.

              [service0 tmp]$ cd openacs-upgrade
              -[service0 openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
            • Step 3: Upgrade your local staging site.�Update your working tree with the new files. The CVS flags ensure that new directories are created and pruned directories destroyed.

              [service0 openacs-upgrade]$ cd /var/lib/aolserver/service0
              -[service0 service0]$ cvs up -Pd
              +        

              Figure�5.2.�Upgrading a local CVS repository

              Upgrading a local CVS repository
              • Step 1: Import new CVS code.�There are two common ways to get new OpenACS code into your local CVS repository - via tarball or with a working CVS checkout of OpenACS. Both methods work well for starting your local repository; the second method is better for incremental additions or upgrades.

                • (a): via tarball.�Download a current tarball and unpack the new files into a working directory.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd /tmp
                  +[$OPENACS_SERVICE_NAME tmp]$ tar xzf openacs-5-1.tar.gz
                  +[$OPENACS_SERVICE_NAME tmp]$ cd openacs-5-1
                • (b): via cvs working checkout.�Create a CVS checkout from OpenACS. The first time you do this, you will need to create the checkout directory. We use one dedicated directory for each branch of OpenACS - if you are using OpenACS 5.0,x, you only need an OpenACS 5.0 branch. The openacs-5-1-compat tag identifies the latest released version of OpenACS 5.1 (ie, 5.1.3 or 5.1.4) and the latest compatible version of each package, including .LRN. Each minor release of OpenACS since 5.0 has this tagging structure. For example, OpenACS 5.1.x has openacs-5-1-compat. + You will want to separately check out all the + packages you are using. +

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver
                  +[$OPENACS_SERVICE_NAME aolserver]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot checkout -r openacs-5-1-compat acs-core
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd openacs-4/packages
                  +[$OPENACS_SERVICE_NAME aolserver]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot checkout -r openacs-5-1-compat packagename packagename2...
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd ../..
                  +[$OPENACS_SERVICE_NAME aolserver]$ mv openacs-4 openacs-5-1

                  If this checkout already exists, you can simply update it instead of recreating it.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver/openacs-5-1
                  +[$OPENACS_SERVICE_NAME aolserver]$ cvs up -Pd
                • (c) A single package via cvs working checkout.�You can add or upgrade a single package at a time, if you already have a cvs working directory.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver/openacs-5-1
                  +[$OPENACS_SERVICE_NAME openacs-5-1]$ cvs up -d myfirstpackage

                  In the next section, the import must be tailored to just this package.

              • Step 2: Merge New OpenACS code.�Now that you have a local copy of the new OpenACS code, you need to import it into your local CVS repository and resolve any conflicts that occur.

                Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.

                [$OPENACS_SERVICE_NAME openacs-5-1]$  cd /var/lib/aolserver/openacs-5-1
                +              [$OPENACS_SERVICE_NAME openacs-5-1]$  cvs -d /var/lib/cvs import -m "upgrade to OpenACS 5.1" $OPENACS_SERVICE_NAME OpenACS openacs-5-1
                +            

                Tip

                If adding or upgrading a single package, run the cvs import from within the base directory of that package, and adjust the cvs command accordingly. In this example, we are adding the myfirstpackage package.

                [root root]# su - $OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME aolserver]$ cd /var/lib/aolserver/openacs-5-0/package/myfirstpackage
                +[$OPENACS_SERVICE_NAME myfirstpackage]$ cvs -d /var/lib/cvs/ import -m "importing package" $OPENACS_SERVICE_NAME/packages/myfirstpackage OpenACS openacs-5-1

                Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.

                [$OPENACS_SERVICE_NAME openacs-4.6]$  cd /var/lib/aolserver
                +[$OPENACS_SERVICE_NAME tmp]$ mkdir $OPENACS_SERVICE_NAME-upgrade
                +[$OPENACS_SERVICE_NAME tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS -kk $OPENACS_SERVICE_NAME > cvs.txt 2>&1
                +(CVS feedback here)

                The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.

                Once you've fixed any conflicts, commit the new code + to your local tree.

                [$OPENACS_SERVICE_NAME tmp]$ cd openacs-upgrade
                +[$OPENACS_SERVICE_NAME openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
              • Step 3: Upgrade your local staging site.�Update your working tree with the new files. The CVS flags ensure that new directories are created and pruned directories destroyed.

                [$OPENACS_SERVICE_NAME openacs-upgrade]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs up -Pd
                 (CVS feedback)
                -[service0 service0]$ exit
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ exit
                 [root root]# 

            Upgrading files for a site using the OpenACS.org CVS repository -

            1. [service0 ~]$ cd /var/lib/aolserver/service0
              -[service0 service0]$ cvs up -Pd
              +      

              1. [$OPENACS_SERVICE_NAME ~]$ cd /var/lib/aolserver/$OPENACS_SERVICE_NAME
                +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$ cvs up -Pd
                 (CVS feedback)
                -[service0 service0]$

              Upgrading a Production Site Safely

              If you are upgrading a production OpenACS site which is on a private CVS tree, this process lets you do the upgrade without risking extended downtime or an unusable site:

              1. Declare a freeze on new cvs updates - ie, you cannot run cvs update +[$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]$

            Upgrading a Production Site Safely

            If you are upgrading a production OpenACS site which is on a private CVS tree, this process lets you do the upgrade without risking extended downtime or an unusable site:

            1. Declare a freeze on new cvs updates - ie, you cannot run cvs update on the production site

            2. Make a manual backup of the production site in addition to the automated backups

            3. Import the new code (for example, OpenACS 5.0.4, openacs-5-0-compat versions of ETP, blogger, and other applications) into a "vendor branch" of the - service0 CVS tree, as described in "Upgrading a local CVS repository", step 1, above. + $OPENACS_SERVICE_NAME CVS tree, as described in "Upgrading a local CVS repository", step 1, above. As soon as we do this, any cvs update command on production might bring new code onto the production site, which - would be bad.

              Do step 2 above (merging conflicts in a service0-upgrade working tree).

            4. + would be bad.

              Do step 2 above (merging conflicts in a $OPENACS_SERVICE_NAME-upgrade working tree).

            5. Manually resolve any conflicts in the working upgrade tree

            6. Use the upgrade script and a recent backup of the production database, to ake - a new upgraded database called service0-upgrade. Now we - have a new website called service0-upgrade. + a new upgraded database called $OPENACS_SERVICE_NAME-upgrade. Now we + have a new website called $OPENACS_SERVICE_NAME-upgrade.

            7. - Test the service0-upgrade site -

            8. If service0-upgrade is fully functional, do the real upgrade.

              1. Take down the service0 site and put up a "down for maintenance" page.

              2. Repeat the upgrade with the most recent database

              3. Test the that the new site is functional. If so, change the upgraded site to respond to + Test the $OPENACS_SERVICE_NAME-upgrade site +

              4. If $OPENACS_SERVICE_NAME-upgrade is fully functional, do the real upgrade.

                1. Take down the $OPENACS_SERVICE_NAME site and put up a "down for maintenance" page.

                2. Repeat the upgrade with the most recent database

                3. Test the that the new site is functional. If so, change the upgraded site to respond to yourserver.net requests. If not, bring the original production site back up and return to the merge.

            View comments on this page at openacs.org
            Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/upgrade-openacs.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/upgrade-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-overview.html,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/upgrade-overview.html 5 May 2004 12:36:08 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/upgrade-overview.html 11 Jun 2004 10:17:39 -0000 1.13 @@ -1,6 +1,6 @@ -Overview

            Overview

            Starting with Version 4.5, all OpenACS core packages support +Overview

            Overview

            Starting with Version 4.5, all OpenACS core packages support automatic upgrade. That means that, if you have OpenACS 4.5 or better, you should always be able to upgrade all of your core packages automatically. If you haven't changed anything, no manual intervention should be required. If you are running - OpenACS prior to 4.5, upgrading will require manual effort.

            If all of these conditions are true:

            • Your OpenACS Core is 5.0.0 or later

            • You do not keep your OpenACS site in a local CVS repository

            • You do not have any custom code

            then you can upgrade automatically using the automated installer in the OpenACS Package Manager (APM), and you can probably skip the rest of this chapter. To upgrade directly from the OpenACS repository using the APM:

            1. Browse to the Installer.

            2. Click install or upgrade under "Install from OpenACS Repository" and select the packages to install or upgrade.

            3. The APM will download the requested packages from OpenACS.org, install the files on your hard drive, run any appropriate database upgrade scripts, and prompt you to restart the server. After restarting the server again, the upgrade is complete.

            Figure�5.1.�Upgrading with the APM

            Upgrading with the APM

            It's always a good idea to precede an upgrade attempt with a snapshot backup.

            Table�5.1.�Assumptions in this section

            name of OpenACS userservice0
            OpenACS server nameservice0
            Root of OpenACS file tree/var/lib/aolserver/service0
            Database backup directory/var/lib/aolserver/service0/database-backup
            View comments on this page at openacs.org
            + OpenACS prior to 4.5, upgrading will require manual effort.

            If all of these conditions are true:

            • Your OpenACS Core is 5.0.0 or later

            • You do not keep your OpenACS site in a local CVS repository

            • You do not have any custom code

            then you can upgrade automatically using the automated installer in the OpenACS Package Manager (APM), and you can probably skip the rest of this chapter. To upgrade directly from the OpenACS repository using the APM:

            1. Browse to the Installer.

            2. Click install or upgrade under "Install from OpenACS Repository" and select the packages to install or upgrade.

            3. The APM will download the requested packages from OpenACS.org, install the files on your hard drive, run any appropriate database upgrade scripts, and prompt you to restart the server. After restarting the server again, the upgrade is complete.

            Figure�5.1.�Upgrading with the APM

            Upgrading with the APM

            It's always a good idea to precede an upgrade attempt with a snapshot backup.

            Table�5.1.�Assumptions in this section

            name of OpenACS user$OPENACS_SERVICE_NAME
            OpenACS server name$OPENACS_SERVICE_NAME
            Root of OpenACS file tree/var/lib/aolserver/$OPENACS_SERVICE_NAME
            Database backup directory/var/lib/aolserver/$OPENACS_SERVICE_NAME/database-backup
            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/upgrade-supporting.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-supporting.html,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 5 May 2004 12:36:08 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 11 Jun 2004 10:17:39 -0000 1.9 @@ -1,4 +1,4 @@ -Upgrading Platform components

            Upgrading Platform components

            Upgrading OpenFTS from 0.2 to 0.3.2

            OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

            1. Uninstall the old OpenFTS Engine from the service0 database.

              1. Browse to http://yourserver/openfts. +Upgrading Platform components

                Upgrading Platform components

                Upgrading OpenFTS from 0.2 to 0.3.2

                OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

                1. Uninstall the old OpenFTS Engine from the $OPENACS_SERVICE_NAME database.

                  1. Browse to http://yourserver/openfts.

                  2. Click Administration.

                  3. Click Drop OpenFTS Engine

                2. Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)

                  cd /usr/local/src/
                             tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
                             chown -R root.root Search-OpenFTS-tcl-0.3.2/
                  @@ -17,22 +17,22 @@
                             cd tsearch/
                             make
                             make install
                  -          exit

                  In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.

                  [root root]# su - service0
                  -          [service0 dev]$ psql service0 -f /usr/local/pgsql/share/contrib/openfts.sql
                  +          exit

                  In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.

                  [root root]# su - $OPENACS_SERVICE_NAME
                  +          [$OPENACS_SERVICE_NAME dev]$ psql $OPENACS_SERVICE_NAME -f /usr/local/pgsql/share/contrib/openfts.sql
                             CREATE
                             CREATE
                  -          [service0 dev]$ psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
                  +          [$OPENACS_SERVICE_NAME dev]$ psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
                             BEGIN
                             CREATE
                             (~30 more lines)
                  -          [service0 dev]$ exit
                  +          [$OPENACS_SERVICE_NAME dev]$ exit
                             [root root]# 
                  -          su - service0
                  -psql service0 -f /usr/local/pgsql/share/contrib/openfts.sql
                  -psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
                  +          su - $OPENACS_SERVICE_NAME
                  +psql $OPENACS_SERVICE_NAME -f /usr/local/pgsql/share/contrib/openfts.sql
                  +psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
                   exit
                3. OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these steps. (You must have already upgraded the OpenFTS driver to - 0.3.2.)

                  1. Browse to http://yourserver/admin/site-map

                  2. On the openfts line, click on set parameters.

                  3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

                  4. Click Set Parameters

                  5. [root root]# restart-aolserver service0
                  6. Browse to http://yourserver/openfts

                  7. Click Administration.

                  8. Click Initialize OpenFTS Engine

                Upgrading from PostGreSQL 7.2 to 7.3

                An OpenACS database created in PostGreSQL 7.2 will not + 0.3.2.)

                1. Browse to http://yourserver/admin/site-map

                2. On the openfts line, click on set parameters.

                3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

                4. Click Set Parameters

                5. [root root]# restart-aolserver $OPENACS_SERVICE_NAME
                6. Browse to http://yourserver/openfts

                7. Click Administration.

                8. Click Initialize OpenFTS Engine

            Upgrading from PostGreSQL 7.2 to 7.3

            An OpenACS database created in PostGreSQL 7.2 will not work correctly in PostGreSQL 7.3. This is because 7.2 truncates function names to 31 characters, but 7.3 does not. This does not cause problems in 7.2, because truncation occurs both at @@ -42,20 +42,20 @@ are not, and so they don't match. Also some functions use casting commands that no longer work in 7.3 and these functions must be recreated.

            - To upgrade an OpenACS site from PostGreSQL 7.2 to 7.3, first upgrade the kernel to 4.6.3. Then, dump the database, run the upgrade script /var/lib/aolserver/service0/bin/pg_7.2to7.3_upgrade_helper.pl on the dump file, and reply the dump. See Forum OpenACS Q&A: PG 7.2->7.3 upgrade gotcha?. Example:

            1. Back up the database as per PostgreSQL.

            2. Run the upgrade script on the backup file.

              [root root]# su - service0
              -          [service0 service0]# cd /var/lib/aolserver/service0/bin
              -          [service0 bin]$ ./pg_7.2to7.3_upgrade_helper.pl \
              +      To upgrade an OpenACS site from PostGreSQL 7.2 to 7.3, first upgrade the kernel to 4.6.3.  Then, dump the database, run the upgrade script /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin/pg_7.2to7.3_upgrade_helper.pl on the dump file, and reply the dump.  See Forum OpenACS Q&A: PG 7.2->7.3 upgrade gotcha?.  Example:

              1. Back up the database as per PostgreSQL.

              2. Run the upgrade script on the backup file.

                [root root]# su - $OPENACS_SERVICE_NAME
                +          [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]# cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin
                +          [$OPENACS_SERVICE_NAME bin]$ ./pg_7.2to7.3_upgrade_helper.pl \
                           ../database-backup/nightly.dmp \
                           ../database-backup/upgrade-7.3.dmp \
                -          /var/lib/aolserver/service0
                +          /var/lib/aolserver/$OPENACS_SERVICE_NAME
                           ==================================================================
                           looking for function acs_object__check_object_ancest in oacs
                           grep result: /var/lib/aolserver/aufrecht-dev/packages/acs-kernel/sql/postgresql/acs-objects-create.sql:create function acs_object__check_object_ancestors (integer,integer,integer)
                 
                           replacing acs_object__check_object_ancest with acs_object__check_object_ancestors
                 
                           (many lines omitted)
                -          [service0 bin]$
                +          [$OPENACS_SERVICE_NAME bin]$
                           
              3. Use perl to replace timestamp with timestamptz in the dump file. See example perl code in step two in /contrib/misc/upgrade_4.6_to_5.0.sh

              4. Create a new user for PostgreSQL 7.3.x, as per the Postgres installation guide. Keep in mind that your installation location is different, and your startup script @@ -73,6 +73,6 @@ installs. When you do ./configure, you'll need to include --prefix=$HOME to ensure that it is installed in the postgres73 user's home directory.

              5. Change the path in - service0's .bashrc or + $OPENACS_SERVICE_NAME's .bashrc or .bash_profile (or both) files to reflect the new postgres73 user directory. Also add in the PGPORT.

              6. Restore the database from dump as per the recovery instructions.

            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/upgrade.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade.html,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/upgrade.html 5 May 2004 12:36:08 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/upgrade.html 11 Jun 2004 10:17:39 -0000 1.17 @@ -1,4 +1,4 @@ -Chapter�5.�Upgrading

            Chapter�5.�Upgrading

            by Joel Aufrecht

            +Chapter�5.�Upgrading

            Chapter�5.�Upgrading

            by Joel Aufrecht

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/uptime.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/uptime.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/uptime.html 5 May 2004 12:36:08 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/uptime.html 11 Jun 2004 10:17:39 -0000 1.4 @@ -1 +1 @@ -External uptime validation

            External uptime validation

            The OpenACS uptime site can monitor your site and send you an email whenever your site fails to respond. If you test the url http://yourserver.test/SYSTEM/dbtest.tcl, you should get back the string success.

            View comments on this page at openacs.org
            +External uptime validation

            External uptime validation

            The OpenACS uptime site can monitor your site and send you an email whenever your site fails to respond. If you test the url http://yourserver.test/SYSTEM/dbtest.tcl, you should get back the string success.

            View comments on this page at openacs.org
            Index: openacs-4/packages/acs-core-docs/www/variables.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/variables.html,v diff -u -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/variables.html 5 May 2004 12:36:08 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/variables.html 11 Jun 2004 10:17:39 -0000 1.15 @@ -1,9 +1,9 @@ -Variables

            Variables

            By joel@aufrecht.org

            +Variables

            Variables

            By joel@aufrecht.org

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

            Date and Time Variables

            Starting with OpenACS 5.0 and the introduction of acs-lang, we recommend retrieving date/time information from the database in - ANSI format and then using lc_time_fmt to format it for display.

            Example�12.1.�Getting datetime from the database ANSI-style

            db_multirow -extend { mydate_pretty } {
            +    ANSI format and then using lc_time_fmt to format it for display.

            Example�12.1.�Getting datetime from the database ANSI-style

            db_multirow -extend { mydate_pretty } {
                 select to_char(mydate, 'YYYY-MM-DD HH24:MI:SS') as mydate_ansi,
                       ...
                 ...
            Index: openacs-4/packages/acs-core-docs/www/win2k-installation.html
            ===================================================================
            RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/win2k-installation.html,v
            diff -u -r1.35 -r1.36
            --- openacs-4/packages/acs-core-docs/www/win2k-installation.html	5 May 2004 12:36:08 -0000	1.35
            +++ openacs-4/packages/acs-core-docs/www/win2k-installation.html	11 Jun 2004 10:17:39 -0000	1.36
            @@ -1,4 +1,4 @@
            -OpenACS Installation Guide for Windows2000

            OpenACS Installation Guide for Windows2000

            by Matthew Burke and Curtis Galloway

            +OpenACS Installation Guide for Windows2000

            OpenACS Installation Guide for Windows2000

            by Matthew Burke and Curtis Galloway

            OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

            NOTE: These instructions were