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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,2 +1,2 @@ -Part�Part II.�For OpenACS Admins

For OpenACS Admins

Help to the folks keeping an OpenACS installation up and running.

View comments on this page at openacs.org
+Part II. Administrator's Guide

Administrator's Guide

Table of Contents

2. Prerequisite Software
Individual Programs
3. Installing on Unix/Linux
Overview
Install Linux and supporting software
Install Oracle 8.1.7
Install PostgreSQL 7.2.3
Install AOLserver 3.3+ad13
Install OpenACS 4.6.2
Credits
4. Installing on Windows
OpenACS Installation Guide for Windows2000
5. Installing on a Macintosh
OpenACS Installation Guide for Mac OS X
6. Upgrading
Support for upgrades.
Upgrading OpenACS 4.5 to 4.6
7. Maintenance
Hosting Web Sites
Database Management
Backup and Recovery
A. Install Red Hat 8.0
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/acs-dev.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/acs-dev.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/acs-dev.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,3 +1,6 @@ -Part�Part III.�For OpenACS Developers

For OpenACS Developers

This is the place to look if you want to extend OpenACS and build on top - of what's already here. Here you can find out about the guts of the system.

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

For OpenACS Developers

+ This is the place to look if you want to extend OpenACS and build on + top of what's already here. Here you can find out about the + guts of the system. +

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.8.2.2 -r1.8.2.3 --- openacs-4/packages/acs-core-docs/www/aolserver.html 20 Dec 2002 04:42:24 -0000 1.8.2.2 +++ openacs-4/packages/acs-core-docs/www/aolserver.html 29 Mar 2003 20:44:52 -0000 1.8.2.3 @@ -1,275 +1,257 @@ -Install AOLserver 3.3+ad13

Install AOLserver 3.3+ad13

+Install AOLserver 3.3+ad13

Install AOLserver 3.3+ad13

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

Download the Distribution

- Mat Kovach is graciously maintaining an AOLServer distribution that - includes all the patches and modules needed to run OpenACS 4.6. These - instructions will describe how to install using his source - distribution. He also has binaries for SuSE 7.3 and OpenBSD 2.8 (and - perhaps more to come), currently located at uptime.openacs.org. -

- It's also possible to download all the pieces and patches yourself: -

- - .... or just Download Mat's - AOLServer distribution to - /tmp - -

-joeuser:~$ cd /tmp
-joeuser:/tmp$ wget -c http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz
-joeuser:/tmp$ cd

- +

This page assumes you have downloaded aolserver to to +/tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz. If not, +get it. It also assumes you are following the 4.6.2-P or 4.6.2-O Reference Platform installation, using Red Hat 8.0. Places where other systems are different are noted.

  1. As root, untar aolserver3.3ad13-oacs1-beta-src.tar.gz - into /usr/local/src + into /usr/local/src. -

    -joeuser:~$ su -
    -Password: **********
    -root:~# cd /usr/local/src
    -root:/usr/local/src# tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz
    -root:/usr/local/src# chown -R root.root aolserver

Set up your user account

- - AOLserver needs to be started as the root user if you want to use - port 80. Once it starts, though, it will drop the root privileges and - run as another user, which you must specify on the command line. It's - important that this user has as few privileges as possible. Why? - Because if an intruder somehow breaks in through AOLserver, you don't - want him to have any ability to do damage to the rest of your - server. At the same time, AOLserver needs to have write access to - some files on your system in order for OpenACS to function - properly. So, we'll run AOLserver as the - nobody user and the - web group. We'll add your regular - user account to the web group and - make sure that OpenACS files are group readable and writable. - -

  • - Run these commands: -

    -root:/usr/local/src# cd
    -root:~# groupadd web
    -root:~# adduser joeuser web
    -root:~# exit

- - Next, we'll set up our environment variables. Add the following lines - to your /home/joeuser/.bash_profile: - -

-joeuser:~$ emacs .bash_profile

- - Add the first set of lines, if you're using Oracle. The 2nd set of - lines, if you're using PostgreSQL. Oracle Note: - 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, - make sure that the '8.1.7' matches your Oracle version. - -

-# For Oracle
-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
-   
-# For PostgreSQL
-export PATH=$PATH:/usr/local/pgsql/bin
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib

- - Be absolutely certain that you have entered these lines correctly and - that you have saved the file - a slight error in these lines can lead - to many inscrutable error messages. Logout and log back in so these - settings will take effect. Use the - echo command to be sure that the - environment variables have been properly assigned. - -

-joeuser:~$ exit
-LOGIN: joeuser
-Password: *********
-joeuser:~$ echo $PATH
-...some other directory paths...:/usr/local/pgsql/bin
-joeuser:~$ echo $LD_LIBRARY_PATH
-:/usr/local/pgsql/lib

- - Note: The result should be different if you're using Oracle. - /ora8/m01/app/oracle/product/8.1.7 - should have been in $PATH. - -

Install libxml2 & headers

- - In order for nsxml to compile, you need libxml2 - (available from http://xmlsoft.org). On Debian, - this can be installed by doing apt-get install - libxml2-dev. Users of other distributions can - download rpms from rpmfind.net. You'll - need the libxml2 and - libxml2-devel packages. -

Compile and install AOLserver

  • Prepare the distribution. You need to be root.

    -joeuser:~$ su -p
    -Password: ********
    -root:~# mkdir -p /usr/local/aolserver
    -root:~# cd /usr/local/src/aolserver
    -root:/usr/local/src/aolserver# ./conf-clean
    +    

    [root@yourserver root]# cd /usr/local/src
    +[root@yourserver src]# tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz
    +[root@yourserver src]#
    +
    cd /usr/local/src
    +tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz
  • Compile and install AOLserver. First, prepare the installation directory and the source code. The message about BUILD-MODULES can be ignored.

    root@yourserver root]# mkdir -p /usr/local/aolserver
    +[root@yourserver root]# cd /usr/local/src/aolserver
    +[root@yourserver aolserver]# ./conf-clean
     cat: BUILD-MODULES: No such file or directory
    -Done.
  • - +Done. +[root@yourserver aolserver]#

    mkdir -p /usr/local/aolserver
    +cd /usr/local/src/aolserver
    +./conf-clean

    Put the name of the driver(s) that you want into conf-db. This can be - "postgresql", - "oracle", or the word - "both" if you want both drivers + postgresql, + oracle, or the word + both if you want both drivers installed. - -

    -root:/usr/local/src/aolserver# echo "postgresql" > conf-db
  • - - conf-inst should contain the +

    [root@yourserver aolserver]# echo "postgresql" > conf-db
    +[root@yourserver aolserver]#

    conf-inst should contain the location where AOLserver is to be installed. This defaults to /usr/local/aolserver, so we - don't need to change it. + don't need to change it.

    conf-make should contain the + name of the GNU Make command on your system. It defaults to + gmake. Verify that gmake is installed:

    [root@yourserver aolserver]# gmake -v
    +GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
    +Built for i386-redhat-linux-gnu
    +Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
    +        Free Software Foundation, Inc.
    +This is free software; see the source for copying conditions.
    +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
    +PARTICULAR PURPOSE.
     
    -        

  • +Report bugs to <bug-make@gnu.org>. - conf-make should contain the - name of the GNU Make command on your system. It defaults to - gmake. You may need to change - this to make. -

    -root:/usr/local/src/aolserver# echo "make" > conf-make
  • +[root@yourserver aolserver]#

    If you don't get similar results, including an equal or higher version number to 3.79.1, install gmake or check your aliases.

    If you're going to be installing the Postgresql driver, you'll have to adjust the makefile first. This will hopefully be cleaned up in future versions of this distribution. -

    -root:/usr/local/src/aolserver# emacs pgdriver/makefile

    +

    [root@yourserver aolserver]# emacs pgdriver/makefile

    Edit the lines containing PGLIB and PGINC so they look like this: -

    -PGINC=/usr/local/pgsql/include
    -
    -PGLIB=/usr/local/pgsql/lib
  • Compile and install AOLserver and modules

    -root:/usr/local/src/aolserver# ./conf

    - +

    PGLIB=/usr/local/pgsql/lib
    +PGINC=/usr/local/pgsql/include

    Run the conf program, which compiles AOLserver and the default modules and installs them.

    [root@yourserver aolserver]# ./conf
    +Building in /usr/local/aolserver
    +with the following modules:
    +aolserver
    +nscache
    +nsrewrite
    +nssha1
    +nsxml
    +pgdriver
    +==================================================================
    +Starting Build Sat Mar  8 10:28:26 PST 2003
    +Running gmake in aolserver/; output in log/aolserver.log
    +(several minute delay here)
    +Running gmake in nscache/; output in log/nscache.log
    +Running gmake in nsrewrite/; output in log/nsrewrite.log
    +Running gmake in nssha1/; output in log/nssha1.log
    +Running gmake in nsxml/; output in log/nsxml.log
    +Running gmake in pgdriver/; output in log/pgdriver.log
    +Creating  ...
    +==================================================================
    +Done Building Sat Mar  8 10:31:35 PST 2003
    +[root@yourserver aolserver]# 

    This takes about 5 minutes. All of the results are logged to files in - /usr/local/src/aolserver/log. Make - sure to check these files to see if any errors occurred. + /usr/local/src/aolserver/log. If you run into problems running AOLserver, check these files for build errors.

  • 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 + Oracle and PostGreSQL. They don't conflict, so if you plan + to use both databases, install both.

    • Oracle

      [root@yourserver aolserver]# cd /usr/local/aolserver/bin
      +[root@yourserver bin]# cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +[root@yourserver bin]# chmod 750 nsd-oracle
      +[root@yourserver bin]#
      +
      cd /usr/local/aolserver/bin
      +cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +chmod 750 nsd-oracle
    • PostGreSQL

      [root@yourserver aolserver]# cd /usr/local/aolserver/bin
      +[root@yourserver bin]# cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +[root@yourserver bin]# chmod 755 nsd-postgres
      +[root@yourserver bin]#
      +
      cd /usr/local/aolserver/bin
      +cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +chmod 755 nsd-postgres
  • OPTIONAL - install nsopenssl. This AOLserver module is required if you want people to connect to your site via https. These commands compile nsopenssl and install it, along with a tcl helper script to handle https connections. You will also need ssl certificates. Because those should be different for each server service, you won't need those instructions until later. You will need the nsopenssl tarball in /tmp.

    [root@yourserver bin]# cd /usr/local/src/aolserver
    +[root@yourserver aolserver]# tar xzf /tmp/nsopenssl-2.1.tar.gz
    +[root@yourserver aolserver]# cd nsopenssl-2.1
    +[root@yourserver nsopenssl-2.1]# make OPENSSL=/usr/local/ssl
    +gcc -I/usr/local/ssl/include -I../aolserver/include -D_REENTRANT=1 -DNDEBUG=1 -g -fPIC -Wall -Wno-unused -mcpu=i686 -DHAVE_CMMSG=1 -DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1   -c -o nsopenssl.o nsopenssl.c
    +(many lines omitted)
    +gcc -shared -nostartfiles -o nsopenssl.so nsopenssl.o config.o init.o ssl.o thread.o tclcmds.o -L/usr/local/ssl/lib -lssl -lcrypto
    +[root@yourserver nsopenssl-2.1]# cp nsopenssl.so /usr/local/aolserver/bin
    +[root@yourserver nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/
    +[root@yourserver nsopenssl-2.1]#
    +
    cd /usr/local/src/aolserver
    +tar xzf /tmp/nsopenssl-2.1.tar.gz 
    +cd nsopenssl-2.1 
    +make OPENSSL=/usr/local/ssl 
    +cp nsopenssl.so /usr/local/aolserver/bin 
    +cp https.tcl /usr/local/aolserver/modules/tcl/
  • OPTIONAL - install OpenFTS. If you want full text search, + and you are running PostGreSQL, install this module to support + FTS. You will need the openfts + tarball in /tmp.

    1. Install Tsearch. This is a PostGreSQL module that + OpenFTS requires.

      [root@yourserver root]# su - postgres
      +[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.3/contrib/tsearch/
      +[postgres@yourserver tsearch]$ make
      +sed 's,MODULE_PATHNAME,$libdir/tsearch,g' tsearch.sql.in >tsearch.sql
      +/usr/bin/flex  -8 -Ptsearch_yy -o'parser.c' parser.l
      +(many lines omitted)
      +rm -f libtsearch.so
      +ln -s libtsearch.so.0.0 libtsearch.so
      +[postgres@yourserver tsearch]$ make install
      +mkdir /usr/local/pgsql/share/contrib
      +mkdir /usr/local/pgsql/doc/contrib
      +(2 lines omitted)
      +/bin/sh ../../config/install-sh -c -m 755 libtsearch.so.0.0 /usr/local/pgsql/lib/tsearch.so
      +[postgres@yourserver tsearch]$ exit
      +logout
       
      -        

Set File Permissions

- - In order to test AOLserver, we'll run it using the sample-config.tcl - file provided in the AOLserver distribution. We need to adjust - permissions a little since AOLserver needs to be able to write its - logs properly. - -

-root:/usr/local/src/aolserver# cd /usr/local/aolserver
-root:/usr/local/aolserver# chown -R root.web log servers
-root:/usr/local/aolserver# chmod -R g+w log servers
-root:/usr/local/aolserver# ls -l
-  drwxr-sr-x    8 root     staff        1024 Nov 12 01:35 .
-  drwxrwsr-x   12 root     staff        1024 Nov 12 01:25 ..
-  drwxr-xr-x    2 root     staff        1024 Nov 12 01:36 bin
-  drwxr-xr-x    2 root     staff        1024 Jun 11  2001 include
-  drwxr-xr-x    3 root     staff        1024 Nov 12 01:36 lib
-  drwxrwxr-x    2 root     web          1024 Nov 12 01:45 log
-  drwxr-xr-x    3 root     staff        1024 Nov 12 01:35 modules
-  -rw-r--r--    1 root     staff        7320 Mar 31  2001 sample-config.tcl
-  drwxrwxr-x    3 root     web          1024 Nov 12 01:35 servers

-

Test AOLserver

  • - - Now, we'll run a quick test to ensure AOLserver is running +[root@yourserver root]# +

    su - postgres
    +cd /usr/local/src/postgresql-7.2.3/contrib/tsearch
    +make
    +make install
    +exit
  • Unpack the OpenFTS tarball and compile and install + the driver.

    [root@yourserver root]# cd /usr/local/src
    +[root@yourserver src]# tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
    +[root@yourserver src]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
    +[root@yourserver Search-OpenFTS-tcl-0.3.2]# ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
    +checking prefix... /usr/local
    +checking for gcc... gcc
    +(many lines omitted)
    +configure: creating ./config.status
    +config.status: creating Makefile.global
    +[root@yourserver Search-OpenFTS-tcl-0.3.2]# make
    +(cd parser; make all)
    +make[1]: Entering directory `/usr/local/src/Search-OpenFTS-tcl-0.3.2/parser'
    +(many lines omitted)
    +packages provided were {Lingua::Stem::Snowball 0.3.2}
    +processed fts_base_snowball.tcl
    +[root@yourserver Search-OpenFTS-tcl-0.3.2]# cd aolserver
    +[root@yourserver aolserver]# make
    +gcc -c -fPIC  -DPACKAGE=\"OPENFTS\" -DVERSION=\"0.3.2\" -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STR
    +(many lines omitted)
    +n_stem.o italian_stem.o norwegian_stem.o portuguese_stem.o russian_stem.o nsfts.o  -o nsfts.so
    +[root@yourserver aolserver]# cp nsfts.so /usr/local/aolserver/bin/
    +[root@yourserver aolserver]#
    +
    cd /usr/local/src 
    +tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
    +cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
    +./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
    +make
    +cd aolserver
    +make
    +cp nsfts.so /usr/local/aolserver/bin
    +
  • Build some supplemental modules.

    [root@yourserver aolserver]# cd ..
    +[root@yourserver Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib
    +[root@yourserver Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts
    +[root@yourserver pgsql_contrib_openfts]# make
    +sed 's,MODULE_PATHNAME,$libdir/openfts,g' openfts.sql.in >openfts.sql
    +gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I. -I../../src/include   -c -o openfts.o openfts.c
    +gcc -shared -o openfts.so openfts.o
    +rm openfts.o
    +[root@yourserver pgsql_contrib_openfts]# su postgres
    +[postgres@yourserver pgsql_contrib_openfts]$ make install
    +/bin/sh ../../config/install-sh -c -m 644 openfts.sql /usr/local/pgsql/share/contrib
    +/bin/sh ../../config/install-sh -c -m 755 openfts.so /usr/local/pgsql/lib
    +/bin/sh ../../config/install-sh -c -m 644 ./README.openfts /usr/local/pgsql/doc/contrib
    +[postgres@yourserver pgsql_contrib_openfts]$ exit
    +[root@yourserver pgsql_contrib_openfts]#
    +
    cd ..
    +cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib
    +cd /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts
    +make
    +su postgres
    +make install
    +exit
  • In order to test AOLserver, we'll run it using the + sample-config.tcl file provided in the AOLserver distribution, + under the nobody user and web + group. The sample-config.tcl configuration writes to the + default log locations, so we need to give it permission to do so + or it will fail. Grant the web + group permission to write to + /usr/local/aolserver/log and + /usr/local/aolserver/servers.

    [root@yourserver root]# cd /usr/local/aolserver
    +[root@yourserver aolserver]# chown -R root.web log servers
    +[root@yourserver aolserver]# chmod -R g+w log servers
    +[root@yourserver aolserver]# ls -l
    +total 32
    +drwxr-sr-x    2 root     root         4096 Mar  8 12:57 bin
    +drwxr-xr-x    3 root     root         4096 Mar  8 10:34 include
    +drwxr-sr-x    3 root     root         4096 Mar  8 10:34 lib
    +drwxrwsr-x    2 root     web          4096 Mar  8 10:31 log
    +drwxr-sr-x    3 root     root         4096 Mar  8 10:31 modules
    +-rw-r--r--    1 root     root         7320 Mar 31  2001 sample-config.tcl
    +drwxrwsr-x    3 root     web          4096 Mar  8 10:31 servers
    +[root@yourserver aolserver]#
    +
    +cd /usr/local/aolserver
    +chown -R root.web log servers
    +chmod -R g+w log servers
    +ls -l

    Now, we'll run a quick test to ensure AOLserver is running correctly. We'll use the sample config file provided with AOLserver. This file will attempt to guess your IP address and hostname. It will then start up the server at port 8000 of that - IP address. + IP address.

    [root@yourserver aolserver]# ./bin/nsd -t sample-config.tcl -u nobody -g web
    +[root@yourserver aolserver]# [08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: starting to read config file...
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nsssl not loaded -- key/cert files do not exist.
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nscp not loaded
    +-- user/password is not set.
    +[08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: finished reading
    +config file.

    The first warning, about nsssl, can be ignored. We won't be using nsssl; we'll be using nsopenssl instead, and we haven't fully configured it yet. The nscp warning refers to the fact that, without a user and password in the config file, the administrative panel of AOLserver won't load. We don't plan to use it and can ignore that error as well. Any other warning or error is unexpected and probably a problem.

    -

    -root:/usr/local/aolserver# ./bin/nsd -t sample-config.tcl -u nobody -g web

    - - As the AOLserver daemon starts up, you should see a few normal - warnings (listed below), which are safe to ignore. - -

    -Warning: nsd.tcl: nsssl not loaded -- key/cert files do not exist.
    -Warning: nsd.tcl: nscp not loaded -- user/password is not set.

    - - The first warning means that the server is missing files for - running ssl, a necessary module - for encrypted HTTPS. See Scott Goodwin's excellent - documentation if you want to set up SSL. The second - warning means that the AOLserver control panel, a special module - for administering AOLserver, could not be loaded. If you're - interested in configuring nscp, please see the AOLserver - documentation. - -

  • - Test to see if AOLserver is working by starting Mozilla or - Lynx, and surfing over to your - web page: + Lynx on the same + computer and surfing over to your web page. If + you browse from another computer and the sample config file + didn't guess your hostname or ip correctly, you'll get a + false negative test. -

    -root:~# lynx localhost:8000

    +

    [root@yourserver aolserver]# lynx localhost:8000

    You should see a "Welcome to AOLserver" page. If this doesn't work, try going to http://127.0.0.1:8000/. If this - still doesn't work, check out the Troubleshooting AOLServer section below. + still doesn't work, check out the Troubleshooting AOLserver section below. Note that you will not be able to browse to the web page from another machine, because AOLserver is only listening to the local address. -

  • +

    Shutdown the test server:

    [root@yourserver aolserver]# killall nsd
    +[root@yourserver aolserver]#

    - Shutdown the test server: - -

    -root:~# killall nsd

    - The killall command will kill all processes with the name nsd, but clearly this is not a good tool to use for managing your services in general. We cover this topic in the Keep AOLServer alive section. -

  • Troubleshooting the AOLserver Install

    - - If you can't view the welcome page, it's likely there's a +

  • Troubleshooting.

    If you can't view the welcome page, it's likely there's a problem with your server configuration. Start by viewing your AOLserver log, which is in /usr/local/aolserver/log/server.log. You should also try to find lines of the form: -

    +    

     [01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: nssock: listening on http://localhost.localdomain:8000 (127.0.0.1:8000)
     [01/Jun/2000:12:11:20][5914.2051][-nssock-] Notice: accepting connections

    @@ -284,15 +266,36 @@ The sample-config.tcl file grabs your address and hostname from your OS settings. -

    +    

     set hostname        [ns_info hostname]
     set address         [ns_info address]

    If you get an error that nssock can't get the requested address, you can set these manually. If you type 0.0.0.0, AOLserver will try to - listen on all available addresses. + listen on all available addresses. Note: + ns_info address doesn't appear + to be supported in current versions of AOLserver. -

    +    

     set hostname        [ns_info hostname]
     #set address         [ns_info address]
    -set address 0.0.0.0
  • ($Id$)
    View comments on this page at openacs.org
    +set address 0.0.0.0
  • OPTIONAL - install Analog web file analyser. You should +have the source tarball in +/tmp. Unpack, compile, and install analog.

    [root@yourserver aolserver]# cd /usr/local/src
    +[root@yourserver src]# tar xzf /tmp/analog-5.31.tar.gz
    +root@yourserver analog-5.31]# make
    +cd src && make
    +make[1]: Entering directory `/usr/local/src/analog-5.31/src'
    +(many lines omitted)
    +***IMPORTANT: You must read the licence before using analog
    +***
    +make[1]: Leaving directory `/usr/local/src/analog-5.31/src'
    +[root@yourserver analog-5.31]# cd ..
    +[root@yourserver src]# mv analog-5.31 /usr/share/
    +[root@yourserver src]#
    +
    cd /usr/local/src
    +tar xzf /tmp/analog-5.31.tar.gz
    +cd analog-5.31
    +make
    +cd ..
    +mv analog-5.31 /usr/share/
  • ($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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/apm-design.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 29 Mar 2003 20:44:52 -0000 1.6.2.2 @@ -1,31 +1,31 @@ -OpenACS 4.6 Package Manager Design

    OpenACS 4.6 Package Manager Design

    +OpenACS 4.6.2 Package Manager Design

    OpenACS 4.6.2 Package Manager Design

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

    Essentials

  • PL/SQL file

  • Introduction

    +In general terms, a package is a unit of software that serves a single well-defined purpose. That purpose may be to provide a service directly to one or more classes of end-user, (e.g., discussion forums and file storage for community members, user profiling tools for the site publisher), or it may be to act as a building block for other packages (e.g., an application programming interface (API) for storing and querying access control rules, or an API for scheduling email alerts). Thus, packages fall into one of two categories: -

    • OpenACS Applications: a "program or group of programs +

      An installation of the OpenACS includes the OpenACS Kernel, some services that extend the kernel's functionality, and some applications intended for end-users. Packages function as individual pieces of subsites. A subsite can contain multiple @@ -89,21 +89,21 @@ packages for other ACS users to download and install.

      For a simple illustration of the difference between ACS without APM (pre-3.3) and ACS with APM (3.3 and beyond), consider a hypothetical ACS installation that uses only two of the thirty-odd modules available circa ACS -3.2 (say, bboard and e-commerce):

      APM itself is part of a package, the OpenACS Kernel, an OpenACS +3.2 (say, bboard and e-commerce):

      APM itself is part of a package, the OpenACS Kernel, an OpenACS service that is the only mandatory component of an OpenACS installation.

    Competitive Analysis

    The OpenACS is a platform for web-based application software, and any software platform has the potential to develop problems like those described above. Fortunately, there are many precedents for systematic solutions, including:

    Borrowing from all of the above, OpenACS 3.3 introduces its own package -management system, the OpenACS Package Manager (APM), which consists of:

    • a standard format for APM packages (also called -"OpenACS packages"), including:

      • version numbering, independent of any other package and the OpenACS as a -whole

      • specification of the package interface

      • specification of dependencies on other packages (if any)

      • attribution (who wrote it) and ownership (who maintains it)

    • web-based tools for package management:

      • obtaining packages from a remote distribution point

      • installing packages, if and only if:

        1. all prerequisite packages are installed

        2. no conflicts will be created by the installation

      • configuring packages (obsoleting the monolithic OpenACS configuration -file)

      • upgrading packages, without clobbering local modifications

      • uninstalling unwanted packages

    • a registry of installed packages, database-backed and +management system, the OpenACS Package Manager (APM), which consists of:

      • a standard format for APM packages (also called +"OpenACS packages"), including:

        • version numbering, independent of any other package and the OpenACS as a +whole

        • specification of the package interface

        • specification of dependencies on other packages (if any)

        • attribution (who wrote it) and ownership (who maintains it)

      • web-based tools for package management:

        • obtaining packages from a remote distribution point

        • installing packages, if and only if:

          1. all prerequisite packages are installed

          2. no conflicts will be created by the installation

        • configuring packages (obsoleting the monolithic OpenACS configuration +file)

        • upgrading packages, without clobbering local modifications

        • uninstalling unwanted packages

      • a registry of installed packages, database-backed and integrated with filesystem-based version control -

      • web-based tools for package development:

        • creating new packages locally

        • releasing new versions of locally-created packages

    Design Tradeoffs

    +

  • web-based tools for package development:

    • creating new packages locally

    • releasing new versions of locally-created packages

  • Design Tradeoffs

    The design chosen for APM was meant to satisfy the following constraints:

    • The process of authoring a package must be as simple as possible.

    • Strict conventions must be established that provide a set of canonical locations and names for files and patterns, for OpenACS application @@ -124,7 +124,7 @@ subsites across the system, and be available for distribution to other OpenACS installations without doing a monolithic upgrade or reinstall.

    API

    The APM is composed of systems for accomplishing a set of package-related tasks. Each of these tasks comprise a feature area that has an API, data -model, and a UI:

    • Authoring a Package

    • Maintaining Multiple Versions of a Package

    • Creating Instances of the Package

    • Specifying Configuration Parameters for each Instance

    Authoring a Package

    Full instructions on how to prepare an OpenACS package are available in Packages. The API here can be invoked manually by a package's data model +model, and a UI:

    • Authoring a Package

    • Maintaining Multiple Versions of a Package

    • Creating Instances of the Package

    • Specifying Configuration Parameters for each Instance

    Authoring a Package

    Full instructions on how to prepare an OpenACS package are available in Packages. The API here can be invoked manually by a package's data model creation script, but need not to be used. This API is part of the APM PL/SQL package.

     
    @@ -165,7 +165,7 @@
         package_key     in apm_package_types.package_key%TYPE
     ) return integer;
     
    -

    Maintaining Multiple Versions of a Package

    While the package authoring API provides a means for registering a +

    Maintaining Multiple Versions of a Package

    While the package authoring API provides a means for registering a package, some information about a package is version dependent. For example, between versions, the owner of a package, its vendor, its URI, and its dependency information may change. The API for package versions allows this @@ -245,7 +245,7 @@ );

    Files associated with a version can be added and removed. The path is -relative to the package-root which is +relative to the package-root which is acs-server-root/packages/package-key.

     -- Add a file to the indicated version. 
     function add_file(
    @@ -327,7 +327,7 @@
         version_name_two        in apm_package_versions.version_name%TYPE
     ) return integer;
     
    -

    Creating Instances of a Package

    Once a package is registered in the system, it is possible to create +

    Creating Instances of a Package

    Once a package is registered in the system, it is possible to create instances of it. Each instance can maintain its own content and parameters.

     
    @@ -382,7 +382,7 @@
     show errors
     
     
    -

    Specifying Configuration Parameters for each Instance

    A parameter is a setting that can be changed on a package instance basis. +

    Specifying Configuration Parameters for each Instance

    A parameter is a setting that can be changed on a package instance basis. Parameters are registered on each package_key, and the values are associated with each instance. Parameters can have default values and can be of type 'string' or 'number.' There is support with this @@ -513,14 +513,14 @@ site-wide administration.

    Configuration/Parameters

    APM has two parameters for configuring how it interacts with the UNIX filesystem, accessible via the Site Map admin page. These parameters need not be changed under most circumstances, but may -need to be tweaked for Windows compatibility.

    • GzipExecutableDirectory +need to be tweaked for Windows compatibility.

      • GzipExecutableDirectory This directory points to where the gunzip program can be found for uncompressing gzip archives. This is needed for the installation of .apm files which are simply gziped tarballs. Default is /usr/local/bin -

      • InfoFilePermissionsMode +

      • InfoFilePermissionsMode This sets the default UNIX permissions used when creating files using the APM. Default is 775.

    Future Improvements/Areas of Likely Change

    APM has been in production since OpenACS 3.3, and as of version 4.0 offers a stable set of features. One major feature planned is integration with the OpenACS @@ -542,4 +542,4 @@ all of this functionality in one interface and it can be confusing from a usability perspective.

    Authors

    • System creator: Bryan Quinn, Jon Salz, Michael Yoon, Lars Pind, Todd Nightingale.

    • System owner: Bryan Quinn

    • Documentation author: Bryan Quinn, building from earlier versions by Jon -Salz, Michael Yoon, and Lars Pind.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/25/2000Bryan Quinn
    0.8Ready for QA9/29/2000Bryan Quinn
    0.9Edited for ACS 4 Beta release10/02/2000Kai Wu
    1.0Edited for OpenACS 4.6 Beta release03/02/2002Roberto Mello
    View comments on this page at openacs.org
    +Salz, Michael Yoon, and Lars Pind.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/25/2000Bryan Quinn
    0.8Ready for QA9/29/2000Bryan Quinn
    0.9Edited for ACS 4 Beta release10/02/2000Kai Wu
    1.0Edited for OpenACS 4.6.2 Beta release03/02/2002Roberto Mello
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/apm-requirements.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/apm-requirements.html 29 Mar 2003 20:44:52 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4.6 Package Manager Requirements

    OpenACS 4.6 Package Manager Requirements

    +OpenACS 4.6.2 Package Manager Requirements

    OpenACS 4.6.2 Package Manager Requirements

    by Bryan Quinn and Todd Nightingale
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -9,7 +9,7 @@ and /admin pages at sub-site level; deprecation of site-wide parameter file).

    To differentiate these new requirements from the requirements of version 3.3, all requirements new in v4 are prefaced with the number -4.

    We gratefully acknowledge the authors of APM 3 for their original design +4.

    We gratefully acknowledge the authors of APM 3 for their original design documentation which suggested these features, as well as the influence of the design and open-source implementation of the Red Hat Package manager, the Debian packaging system, and PERL's CPAN in the development of the ideas @@ -29,36 +29,36 @@ packaging, installing, and configuring OpenACS software in a consistent, user-friendly, and subsite-aware manner.

    System Overview

    The OpenACS Package Manager (APM) consists of: -

    • A standard format for APM packages including:

      • Version numbering, independent of any other package and the OpenACS as a -whole

      • Specification of the package interface

      • Specification of dependencies on other packages (if any)

      • Attribution (who wrote it) and ownership (who maintains it)

    • Web-based tools for package management:

      • Obtaining packages from a remote distribution point

      • Installing packages, if and only if:

        1. All prerequisite packages are installed

        2. No conflicts will be created by the installation

      • Configuring packages (obsoleting the monolithic OpenACS configuration -file)

      • Upgrading packages, without clobbering local modifications

      • Uninstalling unwanted packages

    • A registry of installed packages, database-backed and +

      • A standard format for APM packages including:

        • Version numbering, independent of any other package and the OpenACS as a +whole

        • Specification of the package interface

        • Specification of dependencies on other packages (if any)

        • Attribution (who wrote it) and ownership (who maintains it)

      • Web-based tools for package management:

        • Obtaining packages from a remote distribution point

        • Installing packages, if and only if:

          1. All prerequisite packages are installed

          2. No conflicts will be created by the installation

        • Configuring packages (obsoleting the monolithic OpenACS configuration +file)

        • Upgrading packages, without clobbering local modifications

        • Uninstalling unwanted packages

      • A registry of installed packages, database-backed and integrated with file system-based version control -

      • Web-based tools for package development:

        • Creating new packages locally

        • Releasing new versions of locally-created packages

        • Uploading packages to a global package repository on the web

        • Use of these tools should be safe, i.e. installing or removing a package -should never break an OpenACS installation

      • Web-based tools for package configuration:

        • The ability to change package parameter values on-line through a simple +

        • Web-based tools for package development:

          • Creating new packages locally

          • Releasing new versions of locally-created packages

          • Uploading packages to a global package repository on the web

          • Use of these tools should be safe, i.e. installing or removing a package +should never break an OpenACS installation

        • Web-based tools for package configuration:

          • The ability to change package parameter values on-line through a simple web interface.

          • A new ad_parameter which does not require a monolithic site-wide parameter's file or server restarts for changes to take effect.

          • The ability to manage multiple package instances at the sub-site level.

      Use-cases and User-scenarios

      The APM is intended for the following classes of users, which may or may not -overlap:

      1. Developers (referred to as 'the developer') use +overlap:

        1. Developers (referred to as 'the developer') use the APM to create a software package for distribution and use the procedural -API for direct control of the APM system.

        2. Site-wide administrators (referred to as 'the +API for direct control of the APM system.

        3. Site-wide administrators (referred to as 'the administrator') use the APM to install packages for their OpenACS instance, -and optionally make them available to sub-sites.

        4. Sub-site administrators (referred to as 'the +and optionally make them available to sub-sites.

        5. Sub-site administrators (referred to as 'the sub-admin') use an administration interface to configure and enable -packages for their sub-site.

        Initial Package Development

        David Developer writes a piece of software used to do +packages for their sub-site.

      Initial Package Development

      David Developer writes a piece of software used to do knowledge management (km) for the OpenACS. He distributes his data model, procedure code, UI pages, and his documentation according to the APM specification. He splits the documentation and the code into sub-packages, and creates a KM installation-chain to install both with the APM developer -UI. Noting that his software was built with Patricia -Programmer's Super Widget toolkit, he specifies that as a +UI. Noting that his software was built with Patricia +Programmer's Super Widget toolkit, he specifies that as a dependency. Moreover, since this package is capable of being used at the sub-site level, David configures this option in the package. When the package development is complete, David uses the APM developer UI to construct a distribution file. He assigns it a version number, 1.0, and makes the package -available for download at the OpenACS package repository.

      Initial Package Installation

      Annie Admin learns of David's KM system by browsing +available for download at the OpenACS package repository.

      Initial Package Installation

      Annie Admin learns of David's KM system by browsing the OpenACS package repository. Annie Admin uses the APM administrator UI on her system. She selects to install a package from a URL and types the URL displayed on the system. The APM automatically downloads the package. The @@ -72,16 +72,16 @@ installation was successful, the package is available for use.

      Since the package is available for use, its initialization routines are set to run automatically on server startup. Annie is warned that since there are initialization routines, she must restart the server for the package to -be ready for use. Annie restarts the server.

      Initial Subsite Use of Package

      Annie Admin decides to make the KM module available only to a particular +be ready for use. Annie restarts the server.

      Initial Subsite Use of Package

      Annie Admin decides to make the KM module available only to a particular sub-site type on her OpenACS system, and not others. She specifies this option -using the Sub-site type UI (not part of APM).

      Annie Admin notifies Sally SubAdmin by e-mail that a new +using the Sub-site type UI (not part of APM).

      Annie Admin notifies Sally SubAdmin by e-mail that a new package is now available for use. Sally goes to her sub-site /admin page and sees that a new entry, KM, is available. Sally clicks on it and finds links to the installed KM documentation and to the web based configuration utility. Then, Sally configures the package using an automatically generated web interface and enables KM for use on her sub-site. After some initial use of the package, Sally decides to change some parameters using the SubAdmin UI. -These changes take effect immediately, without any server restarts.

      Upgrade Process

      Sally SubAdmin finds a bug in the KM system and sends a report to David +These changes take effect immediately, without any server restarts.

      Upgrade Process

      Sally SubAdmin finds a bug in the KM system and sends a report to David Developer. David reads the bug report and verifies that the bugs are present in the current version. Because the bugs are present in the shared procedure file, David assigns a watch to the file. David makes the necessary @@ -92,195 +92,195 @@ repository.

      Sally SubAdmin asks Annie Administrator to upgrade the package using the APM UI. This upgrade supersedes the old version of KM at the site-wide level. Once Annie upgrades the package, the new version starts working immediately -in Sally's sub-site.

      Procedural API

      Danielle Developer wants her software to perform +in Sally's sub-site.

      Procedural API

      Danielle Developer wants her software to perform different actions depending on what version of another package is installed. She uses the APM procedural API to check if KM version 1.0 is installed or version 1.1. Based on the results of this procedural call, the software -exhibits different behavior.

      Requirements: Data Model

      • 4.500.0 Package Identification -(All of these items are entered by the developer using the developer UI.)

        4.500.1 A human readable package key that is guaranteed +exhibits different behavior.

      Requirements: Data Model

      • 4.500.0 Package Identification +(All of these items are entered by the developer using the developer UI.)

        4.500.1 A human readable package key that is guaranteed to be unique to the local OpenACS site must be maintained by the APM. For -example, "apm."

        4.500.5 A package id (primary key) that is guaranteed to +example, "apm."

        4.500.5 A package id (primary key) that is guaranteed to be unique to the local site must be maintained by the APM. For example, -"25."

        4.500.10 A package URL that is guaranteed to be unique +"25."

        4.500.10 A package URL that is guaranteed to be unique across all sites must be maintained by the APM. The package URL should point to a server that allows download of the latest version of the package. For example, "http://openacs.org/software." -

      • 4.505.0 Version Identification - (All of these items are entered by the developer using the developer UI.)

        4.505.1 A version id (primary key) that is guaranteed to -be unique to the local site must be maintained by the APM.

        4.505.5 A version URL that is guaranteed to be unique +

      • 4.505.0 Version Identification + (All of these items are entered by the developer using the developer UI.)

        4.505.1 A version id (primary key) that is guaranteed to +be unique to the local site must be maintained by the APM.

        4.505.5 A version URL that is guaranteed to be unique across all sites must be maintained by the APM. The version URL should point to a server that allows download of a specific version of the package.

      Requirements: API

      The API for APM v3 is explicitly a private API. However, it would be useful to obtain information from the APM through a procedural API. Implementing the API specified below is quite easy given that there are pages -that already do all of the below in raw SQL.

      • 4.400.0 Packages Status Predicates

        4.400.1 Given defining information such as a package URL, +that already do all of the below in raw SQL.

        • 4.400.0 Packages Status Predicates

          4.400.1 Given defining information such as a package URL, the APM API can return the status of the package on the local OpenACS -instance.

        • 4.405.0 Package Information Procedures

          4.405.1 The APM API can return information for any +instance.

        • 4.405.0 Package Information Procedures

          4.405.1 The APM API can return information for any locally installed packages, including the version number, paths and files, -and package key.

        • 4.410.0 Sub-site Procedures

          4.410.1 After a package has been installed at the +and package key.

        • 4.410.0 Sub-site Procedures

          4.410.1 After a package has been installed at the site-wide level, the system API will provide means to check for package -presence, creation, enabling, disabling, and destruction on a subsite.

        • 4.415.0 Parameter Values (replaces ad_parameter)

          4.415.1 The system API shall allow subsite parameters for +presence, creation, enabling, disabling, and destruction on a subsite.

        • 4.415.0 Parameter Values (replaces ad_parameter)

          4.415.1 The system API shall allow subsite parameters for an installed package to be set by either site-wide administrators or sub-site admins. The subsite parameter can be set to be non-persistent (but default is to survive server restarts). The subsite parameter can also be set to only -take effect after a server restart (default is immediate).

          4.415.5 Parameters for a given subsite and package can be +take effect after a server restart (default is immediate).

          4.415.5 Parameters for a given subsite and package can be returned by the system API.

      Requirements: Security

      Provisions will be made to assure that packages are securely -identified.

      • 4.600.1 Each package will have a PGP signature and there +identified.

        • 4.600.1 Each package will have a PGP signature and there will be MD5 time stamps for each file within the package. -

        • 4.600.5 The APM will provide a facility to validate both +

        • 4.600.5 The APM will provide a facility to validate both the PGP signature and MD5 stamps information before a package install.

      Requirements: The User Interface

      The user interface is a set of HTML pages that are used to drive the underlying API. It is restricted to site-wide administrators because the actions taken here can dramatically affect the state of the running OpenACS.

      Requirements: The Developer's Interface

      The intent of the developer's interface is to enable the developer to construct and maintain APM packages. It will be possible to disable the developer's interface for production sites to help reduce the chance of site failure; much of the functionality here can have cascading effects -throughout the OpenACS and should not be used on a production site.

      • 10.0 Define a package.

        The developer must be able to create a new package by specifying some +throughout the OpenACS and should not be used on a production site.

        • 10.0 Define a package.

          The developer must be able to create a new package by specifying some identifying information for the package. This includes a package name, a -package key, version information, owner information, and a canonical URL.

          10.1 The APM must maintain the state of all locally -generated packages.

          10.50 If the developer fails to provide the required -information, the package cannot be created.

          10.55 All of the package information should be editable -after creation, except for the package key.

          4.10.60 The package creator must specify whether the +package key, version information, owner information, and a canonical URL.

          10.1 The APM must maintain the state of all locally +generated packages.

          10.50 If the developer fails to provide the required +information, the package cannot be created.

          10.55 All of the package information should be editable +after creation, except for the package key.

          4.10.60 The package creator must specify whether the package is capable of being used in sub-sites, or if only a single, global -instance of the package is permitted.

          4.10.65 If the developer fails to provide unique +instance of the package is permitted.

          4.10.65 If the developer fails to provide unique information for unique fields specified in the data model requirements, the -package cannot be created.

        • 20.0 Add files to a package

          20.1 The developer must be able to add files to the +package cannot be created.

        • 20.0 Add files to a package

          20.1 The developer must be able to add files to the package. This is done by copying the files into the package directory in the host OS's file system. Files can be added at any point after package -creation.

          20.3 Once a package has been versioned and distributed, +creation.

          20.3 Once a package has been versioned and distributed, no new files should be added to the package without incrementing the version -number.

          20.5 The APM's UI should facilitate the process of +number.

          20.5 The APM's UI should facilitate the process of adding new files, by scanning the file system for new files automatically, -and allowing the developer to confirm adding them.

          20.10 The developer cannot add files to a given package -via the UI that do not exist in the file system already.

          20.15 Package file structure must follow a specified -convention. Please see the design -document for what we do currently.

        • 30.0 Remove files from a package

          The developer must be able to remove files from a package. This can be -done in two ways.

          • 30.1 Access the APM UI, browse the file list, and remove -files.

            30.1.1If a file is removed from the package list, but not -from the file system, an error should be generated at package load time.

          • 30.5 Remove the file from file system.

            30.5.1 The APM UI should take note of the fact that the +and allowing the developer to confirm adding them.

            20.10 The developer cannot add files to a given package +via the UI that do not exist in the file system already.

            20.15 Package file structure must follow a specified +convention. Please see the design +document for what we do currently.

          • 30.0 Remove files from a package

            The developer must be able to remove files from a package. This can be +done in two ways.

            • 30.1 Access the APM UI, browse the file list, and remove +files.

              30.1.1If a file is removed from the package list, but not +from the file system, an error should be generated at package load time.

            • 30.5 Remove the file from file system.

              30.5.1 The APM UI should take note of the fact that the file is gone and offer the developer an option to confirm the file's deletion. -

          • 40.0 Modify files in a package.

            40.1 The developer should be able to modify files in the -file system. The APM UI should not interfere with this.

            40.5 However, if the developer modifies files containing -procedural definitions, APM UI should allow a means to watch +

        • 40.0 Modify files in a package.

          40.1 The developer should be able to modify files in the +file system. The APM UI should not interfere with this.

          40.5 However, if the developer modifies files containing +procedural definitions, APM UI should allow a means to watch those files and automatically reload them if changed. See requirement 50.0 -for more detail.

          40.10 Also, although a change in files implies that the +for more detail.

          40.10 Also, although a change in files implies that the package distribution file is out of date, it is the developer's -responsibility to update it.

        • 4.45.0 Manage Package Dependency Information.

          4.45.1 The developer should be able to specify which -interfaces the package requires.

          4.45.5 The developer should be able to specify which -interfaces the package provides.

          4.45.10 Circular dependencies are not allowed.

        • 50.0 Watch a file

          4.50.1 The developer should be able to assign a watch to -any Tcl procedure file, whether in /packages or /tcl.

          50.5 If a watched file is locally modified, then it will +responsibility to update it.

        • 4.45.0 Manage Package Dependency Information.

          4.45.1 The developer should be able to specify which +interfaces the package requires.

          4.45.5 The developer should be able to specify which +interfaces the package provides.

          4.45.10 Circular dependencies are not allowed.

        • 50.0 Watch a file

          4.50.1 The developer should be able to assign a watch to +any Tcl procedure file, whether in /packages or /tcl.

          50.5 If a watched file is locally modified, then it will be automatically reloaded, thus allowing for any changes made to take affect -immediately.

          4.50.10 The setting of a watch should be persistent +immediately.

          4.50.10 The setting of a watch should be persistent across server restarts. -

        • 60.0 Display an XML package specification

          60.1 The developer should be able to view the XML package +

        • 60.0 Display an XML package specification

          60.1 The developer should be able to view the XML package specification that encodes all package information. -

        • 70.0 Write an XML package specification to the file -system

          70.1 The developer should be able to write an up-to-date -XML specification to disk.

          70.5 The developer should be able to request the current -XML specification for all installed, locally generated packages.

        • 130.0 Distribution file generation

          130.1 The developer should be able to generate a .APM -distribution file for the package with just one click.

          130.5 Generating a distribution file implies doing an +

        • 70.0 Write an XML package specification to the file +system

          70.1 The developer should be able to write an up-to-date +XML specification to disk.

          70.5 The developer should be able to request the current +XML specification for all installed, locally generated packages.

        • 130.0 Distribution file generation

          130.1 The developer should be able to generate a .APM +distribution file for the package with just one click.

          130.5 Generating a distribution file implies doing an "up-to-date" check on all of the files. If any of the files have changed since package installation, then a new version of the package is created. -

        • 140.0 Access CVS information

          140.1 The developer should be able to determine the CVS +

        • 140.0 Access CVS information

          140.1 The developer should be able to determine the CVS status of a package, or all packages, with a single click. -

        • 4.200.0 Compound Package Construction

          4.200.1 The developer can include .APM packages +

        • 4.200.0 Compound Package Construction

          4.200.1 The developer can include .APM packages (sub-packages) within a package (the compound package) like any other -file.

          4.200.5 The recommended usage for this feature is to +file.

          4.200.5 The recommended usage for this feature is to allow for separation of optional and required components from the installation as well as better organization of files once installed. For example, all documentation for the community-core can be packages as community-core-doc.apm. It is legal to include sub-packages with dependencies that are not satisfied by the packages in the compound package, but this is discouraged. In such a case, the sub-package should really be a -separate package that is required by the compound package.

          4.200.10 If a sub-package is required for the +separate package that is required by the compound package.

          4.200.10 If a sub-package is required for the installation of the compound package, the compound package should have a registered dependency on the sub-package.

      Requirements: The Site-Wide Administrator's Interface

      The requirement of the administrator's interface is to enable the administrator to install, enable, upgrade, disable, deinstall, and delete -packages.

      • 80.0 Package Enable/Disable

        4.80.1 The administrator should be able mark an installed +packages.

        • 80.0 Package Enable/Disable

          4.80.1 The administrator should be able mark an installed package as enabled. This means that the package is activated and its functionality is delivered through the Request Processor. As of OpenACS 4, this -is done through the sub-site system.

          4.80.5 Moreover, the administrator must be able to +is done through the sub-site system.

          4.80.5 Moreover, the administrator must be able to disable a package, thereby removing the functionality provided to a sub-site. As of OpenACS 4, this is done through the sub-site system. -

        • 90.0 Package Install

          90.1 The administrator must be able to install new -packages either from locally maintained .APM files or from URLs.

          90.5 In the case of an URL, the APM transparently +

        • 90.0 Package Install

          90.1 The administrator must be able to install new +packages either from locally maintained .APM files or from URLs.

          90.5 In the case of an URL, the APM transparently downloads the APM file off the web, proceeds with a file based installation, -and then optionally removes the .APM file just downloaded.

          90.10.1 If .APM files are present in a package, then it -is considered a compound package (use 4.210.0).

          90.15.0 Installation requires these steps:

          1. 90.15.1The package dependencies are scanned. If some +and then optionally removes the .APM file just downloaded.

            90.10.1 If .APM files are present in a package, then it +is considered a compound package (use 4.210.0).

            90.15.0 Installation requires these steps:

            1. 90.15.1The package dependencies are scanned. If some dependencies are not present, the system warns the administrator that -installation cannot proceed until those packages are installed.

            2. 90.15.2 Assuming all dependencies are present, APM -extracts the contents of the APM file into the /packages directory.

            3. 90.15.3 The administrator is offered the option of -importing directly into CVS.

            4. 90.15.4 The administrator is given a list of data model -scripts found in the package and can select which ones to be executed.

            5. 90.15.5 If no errors are recorded during this process, -the package is enabled.

          2. 4.210.0 Compound package Install

            4.210.1 If .APM files are present in a package, then it -is considered a compound package.

            4.210.5.0 Installation of a compound package proceeds -according to the following sequence:

            1. 4.210.5.1 Identify the set of all sub-packages within -the compound package by scanning for all files with .APM.

            2. 4.210.5.2 Identify which sub-packages are required by +installation cannot proceed until those packages are installed.

            3. 90.15.2 Assuming all dependencies are present, APM +extracts the contents of the APM file into the /packages directory.

            4. 90.15.3 The administrator is offered the option of +importing directly into CVS.

            5. 90.15.4 The administrator is given a list of data model +scripts found in the package and can select which ones to be executed.

            6. 90.15.5 If no errors are recorded during this process, +the package is enabled.

          3. 4.210.0 Compound package Install

            4.210.1 If .APM files are present in a package, then it +is considered a compound package.

            4.210.5.0 Installation of a compound package proceeds +according to the following sequence:

            1. 4.210.5.1 Identify the set of all sub-packages within +the compound package by scanning for all files with .APM.

            2. 4.210.5.2 Identify which sub-packages are required by checking the dependencies of the compound package. If there dependencies not satisfied by the current system or the packages included with the compound package, halt installation and inform user to install these packages -first.

            3. 4.210.5.3 Present Administrator with the ability to +first.

            4. 4.210.5.3 Present Administrator with the ability to choose which sub-packages to install. Required sub-packages must be -installed.

            5. 4.210.5.4 Proceed with the installation of each +installed.

            6. 4.210.5.4 Proceed with the installation of each sub-package, starting with required packages. If the sub-package is already installed, then do nothing. Else, If the sub-package is a normal package, -proceed according to 90.15.0, otherwise if it is a compound -package, proceed according to 4.210.5.0.

            7. 4.210.5.5 If all required sub-packages are installed, +proceed according to 90.15.0, otherwise if it is a compound +package, proceed according to 4.210.5.0.

            8. 4.210.5.5 If all required sub-packages are installed, proceed to install non-required sub-packages. If there was a failure during the installation of a required sub-package, then the installation of the -compound package is also a failure.

            9. 4.210.5.6 Any attempt to install a compound package in +compound package is also a failure.

            10. 4.210.5.6 Any attempt to install a compound package in the future involves a choice presented to the admin of installing any -uninstalled sub-packages.

          4. 4.220.0 Recovering from failed package installation

            4.220.1 If any error is generated during package +uninstalled sub-packages.

        • 4.220.0 Recovering from failed package installation

          4.220.1 If any error is generated during package installation, the package is not considered installed. To recover from this -failure, the package should be selected for installation again.

        • 100.0 Version Upgrade

          100.1 The administrator can upgrade to a new version of a -package. This entails

          1. 100.1.1 Running any necessary and included upgrade -scripts.

          2. 100.1.5 Replacing any old files with new versions.

          3. 100.1.10 Marking the old version of the package as -'superseded' and disabling it.

          4. 100.1.15 Assuming no errors from above, the new package -is enabled.

        • 110.0 Package Deinstall

          110.1 The administrator must be able to deinstall a -package that has already been installed. Deinstallation entails:

          1. 110.1.1 Running any data model scripts necessary to drop -the package.

          2. 110.1.5 Moving all of the files into a separate location -in the file system from the installed packages.

          3. 4.110.1.10 If the package is a compound package, then +failure, the package should be selected for installation again.

          4. 100.0 Version Upgrade

            100.1 The administrator can upgrade to a new version of a +package. This entails

            1. 100.1.1 Running any necessary and included upgrade +scripts.

            2. 100.1.5 Replacing any old files with new versions.

            3. 100.1.10 Marking the old version of the package as +'superseded' and disabling it.

            4. 100.1.15 Assuming no errors from above, the new package +is enabled.

          5. 110.0 Package Deinstall

            110.1 The administrator must be able to deinstall a +package that has already been installed. Deinstallation entails:

            1. 110.1.1 Running any data model scripts necessary to drop +the package.

            2. 110.1.5 Moving all of the files into a separate location +in the file system from the installed packages.

            3. 4.110.1.10 If the package is a compound package, then the administrator must confirm removing all sub-packages. Optionally, some -sub-packages can be kept.

            110.5 Deinstalled packages can be re-installed at a later -date.

            4.110.10 If deinstalling a package or any of its +sub-packages can be kept.

          110.5 Deinstalled packages can be re-installed at a later +date.

          4.110.10 If deinstalling a package or any of its sub-packages breaks a dependency, then deinstallation cannot proceed until -the package registering the dependency is removed.

        • 120.0 Package Deletion

          120.1 The administrator should be able to completely +the package registering the dependency is removed.

        • 120.0 Package Deletion

          120.1 The administrator should be able to completely erase all records of the package. This involves removing all instances of the -package, all related database tables and content.

          120.5 This option can only be used if all package +package, all related database tables and content.

          120.5 This option can only be used if all package instances are deleted or marked as disabled. This is purposefully cumbersome because deleting all instances of a package can have far-sweeping -consequences throughout a site and should almost never be done.

        • 150.0 Scan for new or modified packages

          150.1 The administrator should be able to scan the file -system for any changes made in any of the installed package files.

          150.5 The administrator should be able to scan the file +consequences throughout a site and should almost never be done.

        • 150.0 Scan for new or modified packages

          150.1 The administrator should be able to scan the file +system for any changes made in any of the installed package files.

          150.5 The administrator should be able to scan the file system for any newly installed packages.

      Requirements: The Sub-Site Administrator's Interface

      If the developer is in charge of creating packages and the administrator for installing them, then the sub-site administrator is responsible for configuring and enabling packages. In order for a package to be available for a sub-site it must be associated with the sub-site's type specification. This interface is part of the sub-site /admin interface. -

      • 4.300 Creating a package instance.

        4.300.1 From the sub-site /admin interface, there should +

        • 4.300 Creating a package instance.

          4.300.1 From the sub-site /admin interface, there should be an option to view all packages available in the system as well as an -option to add a package to the subsite.

          4.300.5 From the "add" option, the sub-admin +option to add a package to the subsite.

          4.300.5 From the "add" option, the sub-admin can select from a list of packages registered as available in the sub-site -type to which the sub-site belongs.

          4.300.19 Once a package instance is added, it is -available on the list of the subsite's available packages.

        • 4.305 Configuring a package instance.

          4.305.1 An automatic web interface that lists all -parameters with current values must be available.

          4.305.5 Changing the values for the parameters is -accomplished simply by submitting an HTML form.

        • 4.310 Enabling a package instance.

          4.310.1 The sub-admin should be able to enable a package +type to which the sub-site belongs.

          4.300.19 Once a package instance is added, it is +available on the list of the subsite's available packages.

        • 4.305 Configuring a package instance.

          4.305.1 An automatic web interface that lists all +parameters with current values must be available.

          4.305.5 Changing the values for the parameters is +accomplished simply by submitting an HTML form.

        • 4.310 Enabling a package instance.

          4.310.1 The sub-admin should be able to enable a package with a single click. Enabling a package means that the OpenACS will serve its URLs properly. -

        • 4.315 Disabling a package instance.

          4.315.1 The sub-admin should be able to disable a package +

        • 4.315 Disabling a package instance.

          4.315.1 The sub-admin should be able to disable a package with a single click. Disabling a package means that the OpenACS will no longer -serve those URLs.

        • 4.320 Deleting a package instance.

          4.320.1 Deleting a package instance involves deleting not +serve those URLs.

        • 4.320 Deleting a package instance.

          4.320.1 Deleting a package instance involves deleting not only the package instance, but any and all content associated with it. It is questionable whether this option should even be available due to its drastic consequences. Reviewer comments appreciated. @@ -293,4 +293,4 @@ are set using the acs_attribute_values table. The automatic web interface for setting package parameters should be one and the same with the interface for setting acs object attribute values. Consequently, the implementation of -these features should be quite straightforward.

        Revision History

        Document Revision #Action Taken, NotesWhen?By Whom?
        0.1Creation8/10/2000Bryan Quinn, Todd Nightingale
        Reviewed8/11/2000John Prevost, Mark Thomas, and Pete Su
        0.2Revised and updated8/12/2000Bryan Quinn
        0.3Reviewed, revised, and updated - conforms to requirements template.8/18/2000Kai Wu
        0.4Minor edits before ACS 4 Beta.9/30/2000Kai Wu
      View comments on this page at openacs.org
      +these features should be quite straightforward.

      Revision History

      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Creation8/10/2000Bryan Quinn, Todd Nightingale
      Reviewed8/11/2000John Prevost, Mark Thomas, and Pete Su
      0.2Revised and updated8/12/2000Bryan Quinn
      0.3Reviewed, revised, and updated - conforms to requirements template.8/18/2000Kai Wu
      0.4Minor edits before ACS 4 Beta.9/30/2000Kai Wu
      View comments on this page at openacs.org
      Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/backup-recovery.html'. Fisheye: No comparison available. Pass `N' to diff? 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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Bootstrapping OpenACS

      Bootstrapping OpenACS

      +Bootstrapping OpenACS

      Bootstrapping OpenACS

      by Jon Salz
      OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -34,11 +34,11 @@ by trimming the final component from the path to the Tcl library directory (/web/yourservername/tcl). But 0-acs-init.tcl's has an important function, namely sourcing -/packages/acs-core/bootstrap.tcl, which does the following:

      1. Initialize some NSVs used by the core. These NSVs are +/packages/acs-core/bootstrap.tcl, which does the following:

        1. Initialize some NSVs used by the core. These NSVs are documented in /packages/acs-core/apm-procs.tcl - no need to worry about them unless you're an OpenACS core hacker. -

        2. Verify the deletion of obsolete OpenACS files. The +

        3. Verify the deletion of obsolete OpenACS files. The /tcl directory has evolved quite a bit over the months and years, and a few files have come and gone. The /www/doc/removed-files.txt file contains a list of files which @@ -47,18 +47,18 @@ bootstrap.tcl scans through this list, logging error messages to the log if any of these files exist. -

        4. Source *-procs.tcl files in the OpenACS core. +

        5. Source *-procs.tcl files in the OpenACS core. We source each file matching the *-procs.tcl glob in the /packages/acs-kernel directory, in lexicographical order. These procedure are needed to perform any of the following steps. -

        6. Ensure that the database is available by grabbing and +

        7. Ensure that the database is available by grabbing and releasing a handle. If we can't obtain a handle, we terminate initialization (since OpenACS couldn't possibly start up the server without access to the database). -

        8. Register any new packages in the /packages -directory. In each directory inside /packages, we look +

        9. Register any new packages in the /packages +directory. In each directory inside /packages, we look for a .info file; if we find a package that hasn't yet been registered with the package manager (i.e., it's been copied there manually), we insert information about it into the database. (The first time @@ -68,23 +68,23 @@ initially disabled; they must be manually enabled in the package manager before they can be used. -

        10. Ensure that the acs-kernel package is -enabled. If the OpenACS core isn't initialized, the server +

        11. Ensure that the acs-kernel package is +enabled. If the OpenACS core isn't initialized, the server couldn't possibly be operational, so if there's no enabled version of the OpenACS core we simply mark the latest installed one as enabled. -

        12. Load *-procs.tcl files for enabled -packages, activating their APIs. +

        13. Load *-procs.tcl files for enabled +packages, activating their APIs. -

        14. Load *-init.tcl files for enabled packages, +

        15. Load *-init.tcl files for enabled packages, giving packages a chance to register filters and procedures, initialize data structures, etc. -

        16. Verify that the core has been properly initialized by +

        17. Verify that the core has been properly initialized by checking for the existence of an NSV created by the request processor initialization code. If it's not present, the server won't be operational, so we log an error.

        At this point, bootstrap.tcl is done executing. AOLserver proceeds to source the remaining files in the /tcl directory (i.e., unpackaged libraries) and begins listening for connections. -

        ($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/credits.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/credits.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/credits.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/credits.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,13 +1,12 @@ -Credits

      Credits

      +Credits

      Credits

      by Vinod Kurup
      OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff.

      Vinod Kurup put together the January 2002 version of this guide from many sources of - information.

      View comments on this page at openacs.org
      Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/database-management.html'. Fisheye: No comparison available. Pass `N' to diff? 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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Database Access API

      Database Access API

      +Database Access API

      Database Access API

      by Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
      @@ -11,14 +11,14 @@ within OpenACS. Our goal is to develop a coherent API for database access which makes this even easier.

      There were four significant problems with the way OpenACS previously used the -database (i.e., directly through the ns_db interface):

      1. Handle management. We required code to pass database +database (i.e., directly through the ns_db interface):

        1. Handle management. We required code to pass database handles around, and for routines which needed to perform database access but didn't receive a database handle as input, it was difficult to know from which of the three "magic pools" (main, subquery, and log) to allocate a new handle. -

        2. Nested transactions. In our Oracle driver, begin +

        3. Nested transactions. In our Oracle driver, begin transaction really means "turn auto-commit mode off" and end transaction means "commit the current transaction and turn auto-commit mode on." Thus if transactional code needed to call a @@ -46,14 +46,14 @@ already have been committed!. This is not a good thing. -

        4. Unorthodox use of variables. The standard mechanism for +

        5. Unorthodox use of variables. The standard mechanism for mapping column values into variables involved the use of the set_variables_after_query routine, which relies on an uplevel variable named selection (likewise for set_variables_after_subquery and subselection). -

        6. Hard-coded reliance on Oracle. It's difficult to +

        7. Hard-coded reliance on Oracle. It's difficult to write code supporting various different databases (dynamically using the appropriate dialect based on the type of database being used, e.g., using DECODE on Oracle and CASE ... WHEN on @@ -155,7 +155,7 @@ until db_release_unused_handles is invoked (or the script terminates).

          Note that there is no analogue to ns_db gethandle - the -handle is always automatically allocated the first time it's needed.

        Bind Variables

        Introduction

        +handle is always automatically allocated the first time it's needed.

        Bind Variables

        Introduction

        Most SQL statements require that the code invoking the statement pass along data associated with that statement, usually obtained from the user. For instance, in order to delete a WimpyPoint presentation, a Tcl script might @@ -168,7 +168,7 @@ where some_presentation_id is a number which is a valid presentation ID of the presentation I want to delete. It's easy to write code handling situations like this since SQL statements can include -bind variables, which represent placeholders for actual +bind variables, which represent placeholders for actual data. A bind variable is specified as a colon followed by an identifier, so the statement above can be coded as:

        @@ -201,7 +201,7 @@
         
         select * from :table_name
         
        -

        Why Bind Variables Are Useful

        +

        Why Bind Variables Are Useful

        Why bother with bind variables at all - why not just write the Tcl statement above like this:

        @@ -231,7 +231,7 @@
         always considers the values of bind variables to be literals, it becomes more
         difficult for users to perform URL surgery to trick scripts into running
         dangerous queries and DML. 
        -

        Usage

        Every db_* command accepting a SQL command as an argument +

        Usage

        Every db_* command accepting a SQL command as an argument supports bind variables. You can either

        • specify the -bind switch to provide a set with bind variable values, or

        • specify the -bind switch to explicitly provide a list of bind variable names and values, or

        • not specify a bind variable list at all, in which case Tcl variables are @@ -292,7 +292,7 @@ # of "administrator" } -

        Nulls and Bind Variables

        +

        Nulls and Bind Variables

        When processing a DML statement, Oracle coerces empty strings into null. (This coercion does not occur in the WHERE clause of a query, i.e. @@ -330,7 +330,7 @@ its column values), which defeats the purpose of SQL abstraction.

        Therefore, the Database Access API provides a database-independent way to represent null (instead of the Oracle-specific idiom of the -empty string): db_null.

        Use it instead of the empty string whenever you want to set a column value +empty string): db_null.

        Use it instead of the empty string whenever you want to set a column value explicitly to null, e.g.:

         
         set bar [db_null]
        @@ -382,16 +382,16 @@
         ns_db gethandle)! Just start doing stuff, and (if you want) call
         db_release_unused_handles when you're done as a hint to
         release the database handle. 
        -

        db_null +

        db_null
        -db_null
        +db_null
         

        Returns a value which can be used in a bind variable to represent the SQL value null. See Nulls and Bind Variables above.

        -db_foreach +db_foreach
        -db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
        +db_foreach statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
             [ -column_array array_name | -column_set set_name ] \
             code_block [ if_no_rows if_no_rows_block ]
         

        Performs the SQL query sql, executing @@ -409,8 +409,8 @@

        The code block may contain break statements (which terminate the loop and flush the database handle) and continue statements -(which continue to the next row of the loop).

        db_1row
        -db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
        +(which continue to the next row of the loop). 

        db_1row
        +db_1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
             [ -column_array array_name | -column_set set_name ]
         

        Performs the SQL query sql, setting variables to column values. Raises an error if the query does not return exactly 1 row.

        Example:

        @@ -419,48 +419,48 @@
         # Bombs if there's no such greeble!
         # Now $foo and $bar are set.
         
        -
        db_0or1row
        -db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
        +
        db_0or1row
        +db_0or1row statement-name sql [ -bind bind_set_id | -bind bind_value_list ] \
             [ -column_array array_name | -column_set set_name ]
         

        Performs the SQL query sql. If a row is returned, sets variables to column values and returns 1. If no rows are returned, -returns 0. If more than one row is returned, throws an error.

        db_string
        -db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]
        +returns 0. If more than one row is returned, throws an error. 

        db_string
        +db_string statement-name sql [ -default default ] [ -bind bind_set_id | -bind bind_value_list ]
         

        Returns the first column of the result of SQL query sql. If sql doesn't return a row, returns default (or throws an error if default is unspecified). Analogous to database_to_tcl_string and database_to_tcl_string_or_null. -

        db_nextval
        -db_nextval sequence-name
        +

        db_nextval
        +db_nextval sequence-name
         

        Returns the next value for the sequence sequence-name (using a SQL statement like SELECT sequence-name.nextval FROM DUAL). If sequence pooling is enabled for the sequence, transparently uses a value from the pool if available to save a round-trip to the database. -

        db_list
        -db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +

        db_list
        +db_list statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         

        Returns a Tcl list of the values in the first column of the result of SQL query sql. If sql doesn't return any rows, returns an empty list. Analogous to database_to_tcl_list. -

        db_list_of_lists
        -db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +

        db_list_of_lists
        +db_list_of_lists statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         

        Returns a Tcl list, each element of which is a list of all column values in a row of the result of SQL query sql. If sql doesn't return any rows, returns an empty list. (Analogous to database_to_tcl_list_list.) -

        db_list_of_ns_sets
        -db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +

        db_list_of_ns_sets
        +db_list_of_ns_sets statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         

        Returns a list of ns_sets with the values of each column of each row returned by the sql query specified. -

        db_dml
        -db_dml statement-name sql \
        +  

        db_dml
        +db_dml statement-name sql \
             [ -bind bind_set_id | -bind bind_value_list ] \
             [ -blobs blob_list | -clobs clob_list |
               -blob_files blob_file_list | -clob_files clob_file_list ]
        @@ -488,22 +488,22 @@
         
         
         

        -db_write_clob, -db_write_blob, -db_blob_get_file +db_write_clob, +db_write_blob, +db_blob_get_file
        -db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +db_write_clob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         
        -db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +db_write_blob statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         
        -db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
        +db_blob_get_file statement-name sql [ -bind bind_set_id | -bind bind_value_list ]
         

        Analagous to ns_ora write_clob/write_blob/blob_get_file. -

        db_release_unused_handles
        -db_release_unused_handles
        -

        Releases any allocated, unused database handles.

        db_transaction
        -db_transaction code_block [ on_error { code_block } ]
        +

        db_release_unused_handles
        +db_release_unused_handles
        +

        Releases any allocated, unused database handles.

        db_transaction
        +db_transaction code_block [ on_error { code_block } ]
         

        Executes code_block transactionally. Nested transactions are supported (end transaction is transparently ns_db dml'ed when the outermost transaction completes). The @@ -540,16 +540,16 @@ print_the_foo ; # Writes out "foo is 8" -

        db_abort_transaction +
        db_abort_transaction
        -db_abort_transaction
        +db_abort_transaction
         

        Aborts all levels of a transaction. That is if this is called within several nested transactions, all of them are terminated. Use this insetead of db_dml "abort" "abort transaction". -

        db_multirow
        -db_multirow [ -local ] [ -append ] [ -extend column_list ] \
        +

        db_multirow
        +db_multirow [ -local ] [ -append ] [ -extend column_list ] \
             var-name statement-name sql \
             [ -bind bind_set_id | -bind bind_value_list ] \
             code_block [ if_no_rows if_no_rows_block ]
        @@ -606,14 +606,14 @@
         } {
             set user_url [acs_community_member_url -user_id $user_id]
         }
        -    
        db_resultrows
        -db_resultrows
        +    
        db_resultrows
        +db_resultrows
         

        Returns the number of rows affected or returned by the previous statement. -

        db_with_handle
        -db_with_handle var code_block
        +

        db_with_handle
        +db_with_handle var code_block
         

        Places a database handle into the variable var and executes code_block. This is useful when you don't want to have to use the new API (db_foreach, @@ -636,92 +636,92 @@ }

        - + db_name - +
        -			
        +			
         				db_name
        -			
        +			
         		

        Returns the name of the database, as returned by the driver.

        - + db_type - +
        -			
        +			
         				db_type
        -			
        +			
         		

        Returns the RDBMS type (i.e. oracle, postgresql) this OpenACS installation is using. The nsv ad_database_type is set up during the bootstrap process.

        - + db_compatible_rdbms_p - +
        -			db_compatible_rdbms_p db_type
        +			db_compatible_rdbms_p db_type
         		

        Returns 1 if the given db_type is compatible with the current RDBMS.

        - + db_package_supports_rdbms_p - +
        -			db_package_supports_rdbms_p db_type_list
        +			db_package_supports_rdbms_p db_type_list
         		

        Returns 1 if db_type_list contains the current RDMBS type. A package intended to run with a given RDBMS must note this in it's package info file regardless of whether or not it actually uses the database.

        - + db_legacy_package_p - +
        -			db_legacy_package_p db_type_list
        +			db_legacy_package_p db_type_list
         		

        Returns 1 if the package is a legacy package. We can only tell for certain if it explicitly supports Oracle 8.1.6 rather than the OpenACS more general oracle.

        - + db_version - +
        -			db_version
        +			db_version
         		

        Returns the RDBMS version (i.e. 8.1.6 is a recent Oracle version; 7.1 a recent PostgreSQL version.

        - + db_current_rdbms - +
        -			db_current_rdbms
        +			db_current_rdbms
         		

        Returns the current rdbms type and version.

        - + db_known_database_types - +
        -			db_known_database_types
        +			db_known_database_types
         		

        Returns a list of three-element lists describing the database engines known to OpenACS. Each sublist contains the internal database name (used in file @@ -731,4 +731,4 @@ The nsv containing the list is initialized by the bootstrap script and should never be referenced directly by user code. Returns the current rdbms type and version. -

        ($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/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/db-api.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/db-api.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -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. @@ -400,8 +400,8 @@ db_dml "abort" "abort transaction". -

      db_multirow
      -db_multirow [ -local ] [ -append ] [ -extend column_list ] \
      +	  

      db_multirow
      +db_multirow [ -local ] [ -append ] [ -extend column_list ] \
           var-name statement-name sql \
           [ -bind bind_set_id | -bind bind_value_list ] \
           code_block [ if_no_rows if_no_rows_block ]
      @@ -737,4 +737,4 @@
       
       	  

      ($Id$)

      -

      View comments on this page at openacs.org
      +

      View comments on this page at openacs.org
      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.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 24 Nov 2002 21:29:17 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 29 Mar 2003 20:44:52 -0000 1.7.2.2 @@ -1,2 +1,2 @@ -Chapter�4.�OpenACS Developer's Guide
      View comments on this page at openacs.org
      +Chapter 8. Development Reference
      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.8.2.2 -r1.8.2.3 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 20 Dec 2002 04:42:24 -0000 1.8.2.2 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 29 Mar 2003 20:44:52 -0000 1.8.2.3 @@ -1,9 +1,9 @@ -OpenACS Documentation Guide

      OpenACS Documentation Guide

      +OpenACS Documentation Guide

      OpenACS Documentation Guide

      By claus@arsdigita.com, with additions by Roberto Mello and the OpenACS Community -

      Overview of OpenACS 4.6 Documentation

      +

      Overview of OpenACS 4.6.2 Documentation

      ArsDigita created a good documentation ground for us to build upon. Some sections of the documentation, however, lack details and examples; others are simply nonexistant. Our goal is to give @@ -26,13 +26,13 @@

    • It does not require extra effort. Writing in XML is almost identical to SGML, with a couple extra rules. More details in the - LDP + LDP Author Guide.

    Why DocBook?

    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. @@ -52,11 +52,11 @@ 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: - + 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 + not use other tag minimization

    • Write all elements and attributes in lowercase

    • @@ -80,7 +80,7 @@ Some editing tool. A popular one is Emacs with the psgml mode. We have a intro to the PSGML Mode in Emacs as part of our documentation. You can - read about other editing tools in the LDP Author Guide. + read about other editing tools in the LDP Author Guide.

    Writing New Docs

    After you have the tools mentioned above, you need to define a title for your document. Then start thinking about the possible @@ -99,22 +99,22 @@ 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
    +    book                        : Docs for one package - templating
          |
    -     +--chapter                 : One section - for developers
    +     +--chapter                 : One section - for developers
              |
     ---------+------------------------------------------------------
              |
    -         +--sect1               : Single document - requirements
    +         +--sect1               : Single document - requirements
                  |
    -             +--sect2           : Sections - functional requirements
    +             +--sect2           : Sections - functional requirements
                      |
    -                 +--sect3       : Subsections - Programmer's API
    +                 +--sect3       : Subsections - Programmer's API
                          |
    -                    ...         : ...
    +                    ...         : ...
         

    The actual content is split up into documents that start at a sect1-level. These are then tied together in a top-level document that @@ -123,20 +123,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.

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

    - + Inside this container your document will be split up into <sect2>'s, each with the same requirements - id and xreflabel @@ -160,7 +160,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>. @@ -170,12 +170,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

    +

    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:

    +	  

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

     
     	    Put this in your XML:
     
    @@ -212,8 +212,8 @@
     	    Note that since I haven't provided an xreflabel for the subsection, 
     	    packages-looks, the
     	    parser will try its best to explain where the link takes you.
    -	  

    2. Linking outside the documentation

    - +

    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 @@ -222,19 +222,19 @@

    <ulink url="http://www.oracle.com/">Oracle Corporation</ulink>

    ....will create a hyper-link to Oracle in the HTML-version of the documentation. -

    NOTE: Do NOT use ampersands in your hyper links. These are reserved for referencing +

    NOTE: Do NOT use ampersands in your hyper links. These are reserved for referencing entities, which is exactly how you'll make an ampersand: &amp;

    Graphics

    - NOTE: Currently this section currently only takes HTML-output into consideration - + NOTE: Currently this section currently only takes HTML-output into consideration - not a printed version

    - Another Note: Also, it's still not a 100 percent sure that this is how we are going to + Another Note: Also, it's still not a 100 percent sure that this is how we are going to 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>, @@ -260,9 +260,9 @@ 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>

    +

    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 <para>, and that the tags are called <itemizedlist> @@ -275,7 +275,7 @@ <listitem><para>More stuff goes here</para></listitem> </itemizedlist> -

    2. How to make an <ol>

    +

    2. How to make an <ol>

    The ordered list is like the preceding, except that you use <orderedlist> instead:

     	    <orderedlist>
    @@ -284,7 +284,7 @@
     	    <listitem><para>More stuff goes here</para></listitem>
     
     	    </orderedlist>
    -	  
    3. How to make a <dl>

    +

    3. How to make a <dl>

    This kind of list is called a variablelist and these are the tags you'll need to make it happen: <variablelist>, @@ -305,7 +305,7 @@ </variablelist>

    Tables

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

    Emphasis

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

    @@ -376,7 +376,7 @@

     bash$  xsltproc -o outputfilename.xml /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/html.xsl filename.xml
         

    Note

    - This example uses Daniel Veillard's xsltproc command available + This example uses Daniel Veillard's xsltproc command available as part of libxslt from http://www.xmlsoft.org/XSLT/. If you are using other XML processors such as Xalan or Saxon, you will need to change the command line appropriately. @@ -387,7 +387,7 @@

     bash$  xsltproc /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl filename.xml
         

    Further Reading

    • - The LDP Author + The LDP Author Guide has a lot of good information, a table of docbook elements and their "look" in HTML and lots of good links for tools. @@ -421,4 +421,4 @@ 8/3/2002Vinod Kurup0.3 Added OpenACS information, updated tools, added extra links and added info to the Publishing section. - 12/24/2001Roberto Mello0.2Changed recommendation from <phrase> to <emphasis role="strong">01/19/2000Claus Rasmussen0.1Creation12/2000Claus Rasmussen
    View comments on this page at openacs.org
    + 12/24/2001Roberto Mello0.2Changed recommendation from <phrase> to <emphasis role="strong">01/19/2000Claus Rasmussen0.1Creation12/2000Claus Rasmussen
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Constraint naming standard

    Constraint naming standard

    By mbryzek@arsdigita.com


    +Constraint naming standard

    Constraint naming standard

    By mbryzek@arsdigita.com


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

    The Big Picture

    @@ -28,7 +28,7 @@

  • Truncate the column name until it fits.

  • If the constraint name is still too long, you should consider rewriting your entire data model :) -

    Notes:

    • If you have to abbreviate the table name for one of the constraints, abbreviate it for all the constraints

    • If you are defining a multi column constraint, try to truncate the two column names evenly

    Example

    +

    Notes:

    • If you have to abbreviate the table name for one of the constraints, abbreviate it for all the constraints

    • If you are defining a multi column constraint, try to truncate the two column names evenly

    Example

     create table example_topics (
            topic_id    integer
     		   constraint example_topics_topic_id_pk
    @@ -82,4 +82,4 @@
     debugging (e.g. the error will say something like 
     "Cannot insert null value into column"), we recommend naming not null
     constraints to be consistent in our naming of all constraints.
    -

    ($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/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By michael@arsdigita.com and +ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By michael@arsdigita.com and aure@arsdigita.com


    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -37,7 +37,7 @@ For example, the page to view the properties of an ecommerce product is /ecommerce/product.tcl. -

  • For naming files in a page flow, use the convention:

    • foobar.extension (Step 1)

    • foobar-2.extension (Step 2)

    • ...

    • foobar-N.extension (Step N)

    +

  • For naming files in a page flow, use the convention:

    • foobar.extension (Step 1)

    • foobar-2.extension (Step 2)

    • ...

    • foobar-N.extension (Step N)

    where foobar is determined by the above rules.

    @@ -94,7 +94,7 @@ </p>

    This can be at the top or bottom of the file. -

    Using ad_page_contract

    +

    Using ad_page_contract

    For non-library Tcl files (those not in the private Tcl directory), use ad_page_contract after the file path comment (this supersedes set_the_usual_form_variables and @@ -141,7 +141,7 @@ QQvariables, which were automatically created by ad_page_variables and set_the_usual_form_variables. The use of bind variables makes such previous variable syntax obsolete. -

  • Using ad_library

    +

    Using ad_library

    For shared Tcl library files, use ad_library after the file path comment. Its only argument is a doc_string in the standard (javadoc-style) format, like @@ -156,7 +156,7 @@ @author John Doe (jdoe@arsdigita.com) @cvs-id file-standards.html,v 1.2 2000/09/19 07:22:45 ron Exp } -

    Non-Tcl Files

    +

    Non-Tcl Files

    For SQL and other non-Tcl source files, the following file header structure is recommended:

     -- path relative to the ACS root directory
    @@ -229,4 +229,4 @@
     

    Tcl Library Files

    Further standards for Tcl library files are under discussion; we plan to include naming conventions for procs. -

    ($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/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -PL/SQL Standards

    PL/SQL Standards

    +PL/SQL Standards

    PL/SQL Standards

    By richardl@arsdigita.com and yon@arsdigita.com


    @@ -153,4 +153,4 @@ as possible to all source code readers.

  • Lowercase everything, with the exception of %TYPE and %ROWTYPE. -

  • ($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/eng-standards-versioning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Release Version Numbering

    Release Version Numbering

    By Ron Henderson


    +Release Version Numbering

    Release Version Numbering

    By Ron Henderson


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

    @@ -91,4 +91,4 @@ detailed set of regression tests. For now we try to enforce this by restricting work on the release branch to fixing reported problem in the current release, e.g. no new features or big changes to -fundamental behavior.

    ($Id$)
    View comments on this page at openacs.org
    +fundamental behavior.

    ($Id$)
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 29 Mar 2003 20:44:52 -0000 1.6.2.2 @@ -1,2 +1,2 @@ -Chapter�6.�Engineering Standards
    View comments on this page at openacs.org
    +Chapter 9. Engineering Standards
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/filename.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/filename.html 29 Mar 2003 20:44:52 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -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 @@ -11,7 +11,7 @@ your own judgment, consult with peers when possible, and adapt intelligently.

    - Also, bear in mind the audience for detailed design: fellow + Also, bear in mind the audience for detailed design: fellow programmers who want to maintain/extend the software, AND parties interested in evaluating software quality.

    Essentials

    @@ -80,10 +80,6 @@ handle transactions, instead of encapsulating them via procedures). Experience has taught us that we need to focus on the API for maintainability of our systems in the face of constant change. -

    - Also noteworthy is that although the OpenACS currently utilizes the - AOLserver Tcl API, the current drive towards Java is likely to effect - a change in the content of these sections in the future.

    Data Model Discussion

    The data model discussion should do more than merely display the SQL code, since this information is already be available via a link in the @@ -98,7 +94,7 @@ itself.

  • If a core service or other subsystem is being used (e.g., the new parties and groups, permissions, etc.) this should also be mentioned.

  • Any default permissions should be identified herein.

  • Discuss any data model extensions which tie into other - packages.

  • Transactions

    Discuss modifications which the database may undergo from + packages.

  • Transactions

    Discuss modifications which the database may undergo from your package. Consider grouping legal transactions according to the invoking user class, i.e. transactions by an OpenACS-admin, by subsite-admin, by a user, by a developer, etc.

  • User Interface

    @@ -119,7 +115,7 @@ within the OpenACS, this section's details are likely to shift from UI specifics to template interface specifics.

    Configuration/Parameters

    - Under OpenACS 4.6, parameters are set at two levels: at the global level by + Under OpenACS 4.6.2, parameters are set at two levels: at the global level by the OpenACS-admin, and at the subsite level by a sub-admin. In this section, list and discuss both levels of parameters.

    Future Improvements/Areas of Likely Change

    @@ -140,4 +136,4 @@

    • System creator

    • System owner

    • Documentation author

    Revision History

    The revision history table below is for this template - modify it as needed for your actual design document. -

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Creation8/21/2000Josh Finkler, Audrey McLoghlin
    ($Id$)
    View comments on this page at openacs.org
    +

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Creation8/21/2000Josh Finkler, Audrey McLoghlin

    ($Id$)
    View comments on this page at openacs.org
    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.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 24 Nov 2002 21:29:17 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 29 Mar 2003 20:44:52 -0000 1.7.2.2 @@ -1,2 +1,2 @@ -Part�Part I.�OpenACS For Everyone

    OpenACS For Everyone

    High level information: What is OpenACS?

    View comments on this page at openacs.org
    +Part Part I. OpenACS For Everyone

    OpenACS For Everyone

    High level information: What is OpenACS?

    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.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/general-documents.html 24 Nov 2002 21:29:17 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 29 Mar 2003 20:44:52 -0000 1.7.2.2 @@ -1,2 +1,2 @@ -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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/groups-design.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 29 Mar 2003 20:44:52 -0000 1.6.2.2 @@ -1,9 +1,9 @@ -OpenACS 4 Groups Design

    OpenACS 4 Groups Design

    +OpenACS 4 Groups Design

    OpenACS 4 Groups Design

    by Rafael H. Schloming and Mark Thomas
    OpenACS docs are written by the named authors, but 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

      Essentials

      Introduction

      Almost all database-backed websites have users, and need to model the grouping of users. The OpenACS 4 Parties and Groups system is intended to provide the flexibility needed to model complex real-world organizational structures, @@ -62,16 +62,16 @@

      The set of direct membership relationships between a group and a party.

      group_member_index -

      A mapping of a party P to the groups -{Gi}the party is a member of; this mapping +

      A mapping of a party P to the groups +{Gi}the party is a member of; this mapping includes the type of relationship by including the appropriaterel_id from the membership_rels table.

      composition_rels

      The set of direct component relationships between a group and another group.

      group_component_index -

      A mapping of a group Gto the set of groups -{Gi} that G is a component of; +

      A mapping of a group Gto the set of groups +{Gi} that G is a component of; this mapping includes the type of relationship by including the appropriaterel_id from the composition_rels table.

      New groups are created through the group.new constructor. When a specialized type of group is required, the group type can be extended @@ -116,26 +116,26 @@

      A person may appear in the group member map multiple times, for example, by being a member of two different groups that are both components of a third -group. This view is strictly a mapping of approved members +group. This view is strictly a mapping of approved members to groups.

      group_component_map -

      A mapping of a group Gto the set of groups -{Gi} group G is a component of; +

      A mapping of a group Gto the set of groups +{Gi} group G is a component of; this mapping includes the type of relationship by including the appropriaterel_id from the composition_rels table.

      party_member_map -

      A mapping of a party P to the set of parties -{Pi} party P is a member +

      A mapping of a party P to the set of parties +{Pi} party P is a member of.

      party_approved_member_map -

      A mapping of a party P to the set of parties -{Pi} party P is an -approved member of.

    API

    +

    A mapping of a party P to the set of parties +{Pi} party P is an +approved member of.

    API

    The API consists of tables and views and PL/SQL functions.

    Tables and Views

    The group_types table is used to create new types of groups.

    The group_member_map, group_approved_member_map, group_distinct_member_map, group_component_map, party_member_map, and party_approved_member_map views are -used to query group membership and composition.

    PL/SQL API

    Person

    person.new creates a new person and returns the +used to query group membership and composition.

    PL/SQL API

    Person

    person.new creates a new person and returns the person_id. The function must be given the full name of the person in two pieces: first_names and last_name. All other fields are optional and default to null except for object_type which defaults @@ -162,7 +162,7 @@ function person.name ( person_id persons.person_id%TYPE ) return varchar; -

    User

    acs_user.new creates a new user and returns the user_id. +

    User

    acs_user.new creates a new user and returns the user_id. The function must be given the user's email address and the full name of the user in two pieces: first_names and last_name. All other fields are optional. The interface for this function is:

    @@ -204,7 +204,7 @@
     procedure acs_user.unapprove_email (
       user_id       users.user_id%TYPE
     );
    -

    Group

    acs_group.new creates a new group and returns the +

    Group

    acs_group.new creates a new group and returns the group_id. All fields are optional and default to null except for object_type which defaults to 'group', creation_date which defaults to sysdate, and @@ -232,7 +232,7 @@ group_id groups.group_id%TYPE, party_id parties.party_id%TYPE, ) return char; -

    Membership Relationship

    membership_rel.new creates a new membership relationship type +

    Membership Relationship

    membership_rel.new creates a new membership relationship type between two parties and returns the relationship type's rel_id. All fields are optional and default to null except for rel_type which defaults to membership_rel. The interface for this function is:

    @@ -278,7 +278,7 @@
     procedure membership_rel.delete (
       rel_id           membership_rels.rel_id%TYPE
     );
    -

    Composition Relationship

    composition_rel.new creates a new composition relationship type +

    Composition Relationship

    composition_rel.new creates a new composition relationship type and returns the relationship's rel_id. All fields are optional and default to null except for rel_type which defaults to composition_rel. The interface for this function is:

    @@ -301,4 +301,4 @@
     
     

    Rafael H. Schloming

    Documentation author -

    Mark Thomas

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/22/2000Rafael H. Schloming
    0.2Initial Revision08/30/2000Mark Thomas
    0.3Additional revisions; tried to clarify membership/compostion09/08/2000Mark Thomas
    View comments on this page at openacs.org
    +

    Mark Thomas

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/22/2000Rafael H. Schloming
    0.2Initial Revision08/30/2000Mark Thomas
    0.3Additional revisions; tried to clarify membership/compostion09/08/2000Mark Thomas
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 29 Mar 2003 20:44:53 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Groups Requirements

    OpenACS 4 Groups Requirements

    +OpenACS 4 Groups Requirements

    OpenACS 4 Groups Requirements

    by Rafael H. Schloming, Mark Thomas
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -16,7 +16,7 @@ person who is employed by (is a member of) a specific department is also a member of the division and the corporation, and works at (is a member of, but in a different sense) a particular office. OpenACS 4's Parties and Groups -system will support such complex relations faithfully.

    Historical Motivations

    The primary limitation of the OpenACS 3.x user group system is that it +system will support such complex relations faithfully.

    Historical Motivations

    The primary limitation of the OpenACS 3.x user group system is that it restricts the application developer to representing a "flat group" that contains only users: The user_groups table may contain the group_id of a parent group, but parent-child relationship @@ -33,29 +33,29 @@ (e.g., a row with a scope value of "group" but a null group_id)

  • perform extra checks in Tcl and PL/SQL functions and procedures to check both the user_id and -group_id values

  • In sum, the goal of the Parties and Groups system is to +group_id values

    In sum, the goal of the Parties and Groups system is to provide OpenACS programmers and site administrators with simple tools that fully describe the complex relationships that exist among groups in the real world.

    User Scenarios

    Pat Developer has a client project and wants to model the company, its offices, its divisions, and its departments as groups and the employees as -users.

    System Overview

    We start with Groups, which contain members; the -member can be either a person or another group (i.e. a +users.

    System Overview

    We start with Groups, which contain members; the +member can be either a person or another group (i.e. a member is a party).

    In addition to membership, the party and groups system defines a -composition relationship that may exist between groups: A -group can be a component of another group. The child group +composition relationship that may exist between groups: A +group can be a component of another group. The child group is called a component group; the parent group is called a -composite group.

    A group Gc can be a member and/or a component -of another group Gp; the difference is in the way -the members of Gc are related to -Gp:

    • If a party P is a member (or a component) of -Gc and if Gc is a -component of Gp, then P is also -a member (or a component) of Gp

    • If a party P is a member (or a component) of -Gc and if Gc is a -member of Gp, then no -relationship between P and -Gp exists as a result of the relationship between -Gp and Gp.

    Consider an example to make this less abstract: Pretend that the Sierra +composite group.

    A group Gc can be a member and/or a component +of another group Gp; the difference is in the way +the members of Gc are related to +Gp:

    • If a party P is a member (or a component) of +Gc and if Gc is a +component of Gp, then P is also +a member (or a component) of Gp

    • If a party P is a member (or a component) of +Gc and if Gc is a +member of Gp, then no +relationship between P and +Gp exists as a result of the relationship between +Gp and Gp.

    Consider an example to make this less abstract: Pretend that the Sierra Club is a member of Greenpeace. The Sierra Club has chapters; each chapter is a component of the Sierra Club. If Eddie Environmentalist is a member of the Massachusetts Chapter of the Sierra Club, Eddie is @@ -68,158 +68,158 @@ Massachusetts chapter), and between the Sierra Club and Greenpeace.

    Membership requirements can vary from group to group. The parties and groups system must provide a base type that specifies the bare minimum necessary to join a group.

    The parties and groups system must support constraints between a composite -group GP and any of its component groups, -GC. For example, the system should be able to -enforce a rule like: Do not allow a party P to become a -member of GC unless P is already -a member of GP.

    Requirements: Data Model

    The data model for the parties and groups system must provide support for -the following types of entities:

    10.0 Parties +group GP and any of its component groups, +GC. For example, the system should be able to +enforce a rule like: Do not allow a party P to become a +member of GC unless P is already +a member of GP.

    Requirements: Data Model

    The data model for the parties and groups system must provide support for +the following types of entities:

    10.0 Parties -

    A party is an entity used to represent either a -group or a person.

    The data model should enforce these constraints:

    10.10 A party has an email address, which can be -empty.

    10.20 A party may have multiple email addresses -associated with it.

    10.30 The email address of a party must be unique within -an OpenACS system.

    20.0 Groups +

    A party is an entity used to represent either a +group or a person.

    The data model should enforce these constraints:

    10.10 A party has an email address, which can be +empty.

    10.20 A party may have multiple email addresses +associated with it.

    10.30 The email address of a party must be unique within +an OpenACS system.

    20.0 Groups -

    A group is a collection of zero or more parties.

    20.10 The data model should support the subclassing of -groups via OpenACS Objects.

    30.0 Persons +

    A group is a collection of zero or more parties.

    20.10 The data model should support the subclassing of +groups via OpenACS Objects.

    30.0 Persons -

    A person represents an actual human being, past or -present.

    30.10. A person must have -an associated name.

    40.0 Users +

    A person represents an actual human being, past or +present.

    30.10. A person must have +an associated name.

    40.0 Users -

    A user is a person who has registered with an OpenACS site. A -user may have additional attributes, such as a screen name.

    The data model should enforce these constraints:

    40.10 A user must have a non-empty email address.

    40.20 Two different users may not have the same email +

    A user is a person who has registered with an OpenACS site. A +user may have additional attributes, such as a screen name.

    The data model should enforce these constraints:

    40.10 A user must have a non-empty email address.

    40.20 Two different users may not have the same email address on a single OpenACS installation; i.e., an email address identifies a -single user on the system.

    40.30 A user may have multiple email addresses; for -example, two or more email addresses may identify a single user.

    40.40 A user must have password field which can be +single user on the system.

    40.30 A user may have multiple email addresses; for +example, two or more email addresses may identify a single user.

    40.40 A user must have password field which can be empty.

    The data model for the parties and groups system must provide support for -the following types of relationships between entities:

    50.0 Membership +the following types of relationships between entities:

    50.0 Membership

    -A party P is considered a member of a -group G

    • when a direct membership relationship exists between P -and G

    • or when there exists a direct membership relationship between -P and some group GC and -GC has a composition relationship (c.f., 60.0) with G.

    50.10 A party may be a member of multiple groups.

    50.20 A party may be a member of the same group multiple +A party P is considered a member of a +group G

    • when a direct membership relationship exists between P +and G

    • or when there exists a direct membership relationship between +P and some group GC and +GC has a composition relationship (c.f., 60.0) with G.

    50.10 A party may be a member of multiple groups.

    50.20 A party may be a member of the same group multiple times only when all the memberships have different types; for example, Jane may be a member of The Company by being both an Employee and an -Executive.

    50.30 A party as a member of itself is not supported.

    50.40 The data model must support membership -constraints.

    50.50The data model should support the subclassing of +Executive.

    50.30 A party as a member of itself is not supported.

    50.40 The data model must support membership +constraints.

    50.50The data model should support the subclassing of membership via OpenACS Relationships.

    -60.0 Composition -

    A group GC is considered a -component of a second group -GP

    • when a direct composition relationship exists between -GC and GP

    • or when there exists a direct composition relationship between -GC and some group Gi -and Gi has a composition relationship with -GP.

    60.10A group may be a component of multiple groups.

    60.20A group as a component of itself is not -supported.

    60.30The data model must support component -constraints.

    60.40The data model should support the subclassing of -composition via OpenACS Relationships.

    Requirements: API

    The API should let programmers accomplish the following tasks:

    70.10 Create a group +60.0 Composition +

    A group GC is considered a +component of a second group +GP

    • when a direct composition relationship exists between +GC and GP

    • or when there exists a direct composition relationship between +GC and some group Gi +and Gi has a composition relationship with +GP.

    60.10A group may be a component of multiple groups.

    60.20A group as a component of itself is not +supported.

    60.30The data model must support component +constraints.

    60.40The data model should support the subclassing of +composition via OpenACS Relationships.

    Requirements: API

    The API should let programmers accomplish the following tasks:

    70.10 Create a group

    The parties and groups system provides a well defined API call that creates a new group by running the appropriate transactions on the parties and groups system data model. This API is subject to the constraints laid out -in the data model.

    70.20 Create a person +in the data model.

    70.20 Create a person

    The parties and groups system provides a well defined API call that creates a new person by running the appropriate transactions on the parties and groups system data model. This API is subject to the constraints laid out -in the data model.

    70.30 Create a user +in the data model.

    70.30 Create a user

    The parties and groups system provides a well defined API call that creates a new user by running the appropriate transactions on the parties and groups system data model. This API is subject to the constraints laid out in -the data model.

    80.10 Refine a person to a user +the data model.

    80.10 Refine a person to a user

    The parties and groups system provides a well defined API call that creates a new user by running the appropriate transactions on an existing person entity. This API is subject to the constraints laid out in the data -model.

    80.30 Demote a user to a person +model.

    80.30 Demote a user to a person

    The parties and groups system provides a well defined API call that demotes an existing user entity to a person entity by running the appropriate transactions on the existing user. This API is subject to the constraints -laid out in the data model.

    90.10 Update a party +laid out in the data model.

    90.10 Update a party

    The programmer should be able to modify, add, and delete attributes on any -party. This API is subject to the constraints laid out in the data model.

    95.10 Get the attributes of a party +party. This API is subject to the constraints laid out in the data model.

    95.10 Get the attributes of a party

    The programmer should be able to view the attributes on any party. This -API is subject to the constraints laid out in the data model.

    100.10 Delete a party +API is subject to the constraints laid out in the data model.

    100.10 Delete a party

    The system provides an API for deleting a party. This API is subject to -the constraints laid out in the data model.

    100.30 The system may provide a single API call to remove -the party from all groups and then delete the party.

    100.40 In the case of a group, the system may provide a +the constraints laid out in the data model.

    100.30 The system may provide a single API call to remove +the party from all groups and then delete the party.

    100.40 In the case of a group, the system may provide a single API call to remove all parties from a group and then delete the -group.

    110.0 Add a party as a member of a group +group.

    110.0 Add a party as a member of a group

    The parties and groups system provides an API for adding a party as a member of a group. This API is subject to the constraints laid out in the -data model.

    115.0 Add a group as a component of a second group +data model.

    115.0 Add a group as a component of a second group

    The parties and groups system provides an API for adding a group as a component of a second group. This API is subject to the constraints laid out -in the data model.

    120.0 Remove a party as a member of a group +in the data model.

    120.0 Remove a party as a member of a group

    The parties and groups system provides an API for deleting a party's membership in a group. This API is subject to the constraints laid out in the -data model.

    125.0 Remove a group as a component of a second -group +data model.

    125.0 Remove a group as a component of a second +group

    The parties and groups system provides an API for deleting a group's composition in a second group. This API is subject to the constraints laid -out in the data model.

    130.0 Membership check +out in the data model.

    130.0 Membership check

    The parties and groups system provides an API for answering the question: -"Is party P a member of group -G?"

    135.0 Composition check +"Is party P a member of group +G?"

    135.0 Composition check

    The parties and groups system provides an API for answering the question: -"Is group GC a component of group -GP?"

    140.0 Get members query +"Is group GC a component of group +GP?"

    140.0 Get members query

    The parties and groups system provides an API for answering the question: -"Which parties are members of group G?"

    145.0 Get components query +"Which parties are members of group G?"

    145.0 Get components query

    The parties and groups system provides an API for answering the question: -"Which groups are components of group G?"

    150.0 Member-of-groups query +"Which groups are components of group G?"

    150.0 Member-of-groups query

    The parties and groups system provides an API for answering the question: -"Of which groups is party P a member?"

    155.0 Component-of-groups query +"Of which groups is party P a member?"

    155.0 Component-of-groups query

    The parties and groups system provides an API for answering the question: -"Of which groups is group G a component?"

    160.0 Allowed membership check +"Of which groups is group G a component?"

    160.0 Allowed membership check

    The parties and groups system provides an API for answering the question: -"Is party P allowed to become a member of group -G?"

    165.0 Allowed composition check +"Is party P allowed to become a member of group +G?"

    165.0 Allowed composition check

    The parties and groups system provides an API for answering the question: -"Is group GC allowed to become a component -of group GP?"

    170.0 Efficiency +"Is group GC allowed to become a component +of group GP?"

    170.0 Efficiency

    Since many pages at a site may check membership in a group before serving a page (e.g., as part of a general permissions check), the data model must support the efficient storage and retrieval of party attributes and -membership.

    180.0 Ease of Use +membership.

    180.0 Ease of Use

    Since many SQL queries will check membership in a group as part of the where clause, whatever mechanism is used to check membership in SQL should be fairly small and simple.

    Requirements: User Interface

    The user interface is a set of HTML pages that are used to drive the -underlying API. The user interface may provide the following functions:

    • 200.0 Create a party

    • 210.0 View the attributes of a party

    • 220.0 Update the attributes of a party

    • 240.0 Delete a party

    • 250.0 Add a party to a group

    • 260.0 Remove a party from a group

    • 270.0 Perform the membership and composition checks -outlined in 130.x to 165.x

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/16/2000Rafael Schloming
    0.2Initial revision08/19/2000Mark Thomas
    0.3Edited and reviewed, conforms to requirements template08/23/2000Kai Wu
    0.4Further revised, added UI requirements08/24/2000Mark Thomas
    0.5Final edits, pending freeze08/24/2000Kai Wu
    0.6More revisions, added composition requirements08/30/2000Mark Thomas
    0.7More revisions, added composition requirements09/08/2000Mark Thomas
    View comments on this page at openacs.org
    +underlying API. The user interface may provide the following functions:

    • 200.0 Create a party

    • 210.0 View the attributes of a party

    • 220.0 Update the attributes of a party

    • 240.0 Delete a party

    • 250.0 Add a party to a group

    • 260.0 Remove a party from a group

    • 270.0 Perform the membership and composition checks +outlined in 130.x to 165.x

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/16/2000Rafael Schloming
    0.2Initial revision08/19/2000Mark Thomas
    0.3Edited and reviewed, conforms to requirements template08/23/2000Kai Wu
    0.4Further revised, added UI requirements08/24/2000Mark Thomas
    0.5Final edits, pending freeze08/24/2000Kai Wu
    0.6More revisions, added composition requirements08/30/2000Mark Thomas
    0.7More revisions, added composition requirements09/08/2000Mark Thomas
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/index.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/index.html 29 Mar 2003 20:44:53 -0000 1.6.2.2 @@ -1,2 +1,2 @@ -OpenACS Documentation

    OpenACS Documentation


    Table of Contents

    Part I. OpenACS For Everyone
    1. High level information: What is OpenACS?
    Overview
    OpenACS 4.6 Release Notes
    Part II. For OpenACS Admins
    2. Installing on Unix/Linux
    Overview
    Install an Operating System
    Install Oracle 8.1.7
    Install PostgreSQL 7.2.3
    Install AOLserver 3.3+ad13
    Install OpenACS 4.6
    Next Steps
    Credits
    3. Installing on Windows
    Overview
    OpenACS Installation Guide for Windows2000
    Part III. For OpenACS Developers
    4. OpenACS Developer's Guide
    Overview
    OpenACS 4.6 Packages
    OpenACS 4.6 Data Models and the Object System
    The Request Processor
    The OpenACS Database Access API
    Using Templates in OpenACS 4.6
    Groups, Context, Permissions
    Writing OpenACS 4.6 Application Pages
    5. Other Developer Resources
    Overview
    Parties in OpenACS 4.6
    OpenACS 4.x Permissions Tediously Explained
    Object Identity
    Programming with AOLserver
    6. Engineering Standards
    OpenACS Documentation Guide
    Using PSGML mode in Emacs
    Detailed Design Documentation Template
    System/Application Requirements Template
    Release Version Numbering
    Constraint naming standard
    ACS File Naming and Formatting Standards
    PL/SQL Standards
    7. Kernel Documentation
    Overview
    OpenACS 4 Object Model Requirements
    OpenACS 4 Object Model Design
    OpenACS 4 Permissions Requirements
    OpenACS 4 Permissions Design
    OpenACS 4 Groups Requirements
    OpenACS 4 Groups Design
    OpenACS 4 Subsites Requirements
    OpenACS 4 Subsites Design Document
    OpenACS 4.6 Package Manager Requirements
    OpenACS 4.6 Package Manager Design
    OpenACS 4 Security Requirements
    OpenACS 4 Security Design
    OpenACS 4 Security Notes
    OpenACS 4 Request Processor Requirements
    OpenACS 4 Request Processor Design
    Database Access API
    Documenting Tcl Files: Page Contracts and Libraries
    Bootstrapping OpenACS

    List of Tables

    5.1.
    5.2.
    5.3.
    5.4.
    5.5.
    5.6.
    5.7.
    5.8.
    5.9.
    5.10.
    5.11.
    5.12.
    View comments on this page at openacs.org
    +OpenACS Documentation

    OpenACS Documentation


    Table of Contents

    Part I. OpenACS For Everyone
    1. High level information: What is OpenACS?
    Overview
    OpenACS 4.6.2 Release Notes
    II. Administrator's Guide
    2. Prerequisite Software
    Individual Programs
    3. Installing on Unix/Linux
    Overview
    Install Linux and supporting software
    Install Oracle 8.1.7
    Install PostgreSQL 7.2.3
    Install AOLserver 3.3+ad13
    Install OpenACS 4.6.2
    Credits
    4. Installing on Windows
    OpenACS Installation Guide for Windows2000
    5. Installing on a Macintosh
    OpenACS Installation Guide for Mac OS X
    6. Upgrading
    Support for upgrades.
    Upgrading OpenACS 4.5 to 4.6
    7. Maintenance
    Hosting Web Sites
    Database Management
    Backup and Recovery
    A. Install Red Hat 8.0
    Part III. For OpenACS Developers
    8. Development Reference
    OpenACS 4.6.2 Packages
    OpenACS 4.6.2 Data Models and the Object System
    The Request Processor
    The OpenACS Database Access API
    Using Templates in OpenACS 4.6.2
    Groups, Context, Permissions
    Writing OpenACS 4.6.2 Application Pages
    Parties in OpenACS 4.6.2
    OpenACS 4.x Permissions Tediously Explained
    Object Identity
    Programming with AOLserver
    9. Engineering Standards
    OpenACS Documentation Guide
    Using PSGML mode in Emacs
    Detailed Design Documentation Template
    System/Application Requirements Template
    Release Version Numbering
    Constraint naming standard
    ACS File Naming and Formatting Standards
    PL/SQL Standards
    10. Kernel Documentation
    Overview
    OpenACS 4 Object Model Requirements
    OpenACS 4 Object Model Design
    OpenACS 4 Permissions Requirements
    OpenACS 4 Permissions Design
    OpenACS 4 Groups Requirements
    OpenACS 4 Groups Design
    OpenACS 4 Subsites Requirements
    OpenACS 4 Subsites Design Document
    OpenACS 4.6.2 Package Manager Requirements
    OpenACS 4.6.2 Package Manager Design
    Database Access API
    OpenACS 4 Security Requirements
    OpenACS 4 Security Design
    OpenACS 4 Security Notes
    OpenACS 4 Request Processor Requirements
    OpenACS 4 Request Processor Design
    Documenting Tcl Files: Page Contracts and Libraries
    Bootstrapping OpenACS

    List of Tables

    8.1.
    8.2.
    8.3.
    8.4.
    8.5.
    8.6.
    8.7.
    8.8.
    8.9.
    8.10.
    8.11.
    8.12.
    View comments on this page at openacs.org
    Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/individual-programs.html'. Fisheye: No comparison available. Pass `N' to diff? 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.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/install-overview.html 24 Nov 2002 21:29:17 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/install-overview.html 29 Mar 2003 20:44:53 -0000 1.7.2.2 @@ -1,5 +1,5 @@ -Overview

    Overview

    +Overview

    Overview

    by Vinod Kurup
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -17,26 +17,28 @@ et al decided to port ACS from Oracle to PostgreSQL, thus making it a fully open-source solution.

    - OpenACS 4.6 is the next generation of the web toolkit. It's based on + OpenACS 4.6.2 is the next generation of the web toolkit. It's based on ACS 4, but no longer follows ArsDigita development. Unlike both ACS (which required Oracle) and OpenACS 3.x (which required PostgreSQL), - OpenACS 4.6 allows you to use either database. It's also built in such + OpenACS 4.6.2 allows you to use either database. It's also built in such a way to allow enterprising hackers (in the good sense of the word) to extend it to other databases. Don Baccus leads the development and numerous developers (and non-developers) contribute from around the world.

    Purpose of this document

    - This document will describe how to install OpenACS 4.6 from scratch, - using the source code. We will assume that you have an OS installed, - but we'll discuss this more in the next section. For most of this - guide, we will assume that you are using Linux on a PC, but we'll - also point you to excellent step-by-step guides for other operating - systems. + + This document will describe how to install, configure, and + maintain an installation of OpenACS 4.6.2 on a Unix-like + system, including all supporting software. All examples + in this chapter are part of the OpenACS 4.6.2-P or + OpenACS 4.6.2-O Reference Platform, which use Red + Hat 8.0. Differences between the Reference Platform + and common alternate platforms are noted where known.

    Requirements

    You will need a PC (or equivalent) with at least these minimum requirements:

    • Pentium processor

    • 128 MB RAM - (much more if you want Oracle)

    • 4 GB hard drive

    + (much more if you want Oracle)

  • 4 GB hard drive

  • You will need all of the required Chapter 2.

    If you want to serve pages to people outside of your machine, you'll need a network connection of some type.

    @@ -53,12 +55,12 @@

    • Adding users, groups, setting passwords

    • - Starting an X server and running an X program remotely + (For Oracle) Starting an X server and running an X program remotely

    • Basic file management using cp, rm, mv, and cd

    • - Compiling a program using a Makefile + Compiling a program using ./config and make.

    If you've never done these things before, consider exploring UNIX in greater depth before installing OpenACS. Some useful resources for @@ -71,11 +73,25 @@

    Steps involved

    The basic steps to getting OpenACS up and running are:

    1. Install an OS

    2. Install a webserver (AOLServer)

    3. Install a database (Oracle or - PostgreSQL)

    4. Install a database - driver (allows the webserver to talk to the database) -

    5. Configure the webserver and - database

    6. Start the OpenACS - installer

    What if I get stuck?

    + PostgreSQL)

  • Install a database driver (allows the webserver to talk to the database) +

  • Start the OpenACS installer, which will configure a database instance..

  • How to use this guide

    • This is text you will see on + screen, such as a Button or link + in a radio button list or menu.

    • This is text that you will type.

    • This is text from a program or file which you may need to +examine or edit:

      if {$database == "oracle"} {
      +    set db_password        "mysitepassword"
      +}
    • 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.

      [root@localhost root]# su - nsadmin
      +[nsadmin@localhost aolserver]$ svc -d /service/server1
      +[nsadmin@localhost aolserver]$ dropdb server1
      +DROP DATABASE
      +[nsadmin@localhost aolserver]$ createdb server1
      +CREATE DATABASE
      +
      su - nsadmin
      +svc -d /service/server1
      +dropdb server1
      +createdb server1

    What if I get stuck?

    We'll do our best to assure that following our instructions will get you to the promised land. If something goes wrong, don't panic. There are plenty of ways to get help. Here are some tips: @@ -97,9 +113,13 @@ openacs.org - you'll often find many people who have struggled through the same spot that you're in.

  • + The bottom of each page has a link to OpenACS.org, where you can post + comments and read other users comments about the + contents of the page. +

  • Ask questions at the irc channel on openprojects.net - (#openacs). They're knowledgeable and quite friendly if you can - keep them on topic. + (#openacs). They're knowledgeable and quite friendly + if you can keep them on topic.

  • Post a question on the bboards. Make sure you've done a search first. When you do post, be sure to include @@ -118,15 +138,16 @@ better way. Well, not quite. Jonathan Marsden has created RPMs (at http://www.xc.org) for OpenACS 4.5 but there are not yet any for version - 4.6. There has been talk about automating the install process, + 4.6.2. There has been talk about automating the install process, but that hasn't happened yet. Stay tuned!

  • 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 know and I'll fix it right away. -

    These are a few of my sources:

    Resources

    +

    Linux Install Guides

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

    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 + some basic precautions, but security is a process, not a + condition. If you are responsible for a computer hooked to the + internet, you are responsible for learning some rudiments of + security, such as monitoring the state of a computer, + maintaining patch levels, and keeping backups. We recommend + these resources: +

    Resources

    Here are some resources that OpenACS users have found useful.

    Books

    • @@ -190,4 +260,4 @@ IBM developerworks on basic and intermediate Linux skills (requires registration) -

    ($Id$)
    View comments on this page at openacs.org
    +

    ($Id$)
    View comments on this page at openacs.org
    Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/install-redhat.html'. Fisheye: No comparison available. Pass `N' to diff? 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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 29 Mar 2003 20:44:53 -0000 1.6.2.2 @@ -1,2 +1,2 @@ -Chapter�7.�Kernel Documentation
    View comments on this page at openacs.org
    +Chapter 10. 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.3.2.1 -r1.3.2.2 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 24 Nov 2002 21:29:17 -0000 1.3.2.1 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 29 Mar 2003 20:44:54 -0000 1.3.2.2 @@ -1,22 +1,31 @@ -Overview

    Overview

    - Compared to its predecessors, version 4.6 of OpenACS has a much +Overview

    Overview

    + Compared to its predecessors, version 4.6.2 of OpenACS has a much more structured organization, i.e. the most significant change is found at the system architecture level, reflected in the following hierarchy: -

    • The OpenACS 4.6 Kernel, which handles system-wide necessities - such as metadata, security, users and groups, subsites, and - package management and deployment. -

    • The OpenACS 4.6 Core, which comprises all the other packages - that ship with the kernel and are most frequently needed by users, - such as templating, bboard, and user registration/management. The - packages tend to be developed and distributed with the kernel. -

    • OpenACS 4.6 Application packages, which typically provide - user-level web services built on top of the Kernel and Core. Such - packages include those built by ArsDigita as well as external - contributors. Application packages are developed separately from - the Kernel, and are typically released independently of it. +

      • + The OpenACS 4.6.2 Kernel, which + handles system-wide necessities such as metadata, + security, users and groups, subsites, and package + management and deployment. +

      • + The OpenACS 4.6.2 Core, which + comprises all the other packages that ship with the + kernel and are most frequently needed by users, such as + templating, bboard, and user + registration/management. The packages tend to be + developed and distributed with the kernel. +

      • + OpenACS 4.6.2 Application + packages, which typically provide user-level + web services built on top of the Kernel and Core. Such + packages include those built by ArsDigita as well as + external contributors. Application packages are + developed separately from the Kernel, and are typically + released independently of it.

      This document provides a high level overview of the kernel - package. Documentation for the other packages can be found elsewhere. -

    View comments on this page at openacs.org
    + package. Documentation for the other packages can be found + elsewhere. +

    View comments on this page at openacs.org
    Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/linux-installation.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/maintenance-web.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 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/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/object-identity.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,20 +1,20 @@ -Object Identity

    Object Identity

    +Object Identity

    Object Identity

    by Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. -

    One of the major design features of OpenACS 4.6 is the explicit representation +

    One of the major design features of OpenACS 4.6.2 is the explicit representation of object identity. The reason I say "explicit representation" is because the concept of object identity has been around forever. It is inherent to our problem domain. Consider the example of 3.x style scoping. The 3.x data models use the triple (user_id, group_id, -scope) to identify an object. In the 4.6 data model this +scope) to identify an object. In the 4.6.2 data model this object is explicitly represented by a single party_id.

    Another good example of this is can be found in the user groups data model. The 3.x user groups data model contains another example of an implied identity. Every mapping between a user and a group could have an arbitrary number of attached values (user_group_member_fields, etc.). In this case it is the pair (group_id, user_id) that implicitly refers to an -object (the person's membership in a group). In the 4.6 data model this +object (the person's membership in a group). In the 4.6.2 data model this object identity is made explicit by adding an integer primary key to the table that maps users to groups.

    Coming from a purely relational world, this might seem slightly weird at first. The pair (group_id, user_id) is sufficient to uniquely identify the @@ -33,4 +33,4 @@ even capable of fully tracking the history of membership state.

    The design choice of explicitly representing object identity with an integer primary key that is derived from a globally unique sequence is the key to eliminating redundant code and replacing it with generic object -level services.

    ($Id$)
    View comments on this page at openacs.org
    +level services
    .

    ($Id$)
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Object Model Design

    OpenACS 4 Object Model Design

    +OpenACS 4 Object Model Design

    OpenACS 4 Object Model Design

    by Pete Su, Michael Yoon, Richard Li @@ -37,7 +37,7 @@ object type (e.g. users) to instances of another object type (e.g. groups).

    The next section will explore these facilities in the context of the the -particular programming idioms that we wish to generalize.

    Related Links

    This design document should be read along with the design documents for the new groups system, subsites and the permissions system

    History

    The motivation for most of the facilities in the OpenACS 4 Object Model can be +particular programming idioms that we wish to generalize.

    Related Links

    This design document should be read along with the design documents for the new groups system, subsites and the permissions system

    History

    The motivation for most of the facilities in the OpenACS 4 Object Model can be understood in the context of the 3.x code base and the kinds of programming idioms that evolved there. These are listed and discussed below.

    Object Identification

    Object identification is a central mechanism in OpenACS 4. Every application object in OpenACS 4 has a unique ID which is mapped to a row in a central table @@ -77,14 +77,14 @@ make sure every object the system is to manage is associated with a row in acs_objects. More importantly, if they do this, new services like general comments can be created without requiring existing applications -to "hook into" them via new metadata.

    Note: Object identifiers are a good example of metadata +to "hook into" them via new metadata.

    Note: Object identifiers are a good example of metadata in the new system. Each row in acs_objects stores information about the application object, but not the application object itself. This becomes more clear if you skip ahead and look at the SQL schema code that defines this table.

    Object Context and Access Control

    Until the implementation of the general permissions system, every OpenACS application had to manage access control to its data separately. Later on, a notion of "scoping" was introduced into the core data model.

    "Scope" is a term best explained by example. Consider some -hypothetical rows in the address_book table:

    ...scopeuser_idgroup_id...
    ...user123...
    ...group456...
    ...public...

    The first row represents an entry in User 123's personal address book, +hypothetical rows in the address_book table:

    ...scopeuser_idgroup_id...
    ...user123...
    ...group456...
    ...public...

    The first row represents an entry in User 123's personal address book, the second row represents an entry in User Group 456's shared address book, and the third row represents an entry in the site's public address book.

    In this way, the scoping columns identify the security context in which a @@ -245,8 +245,8 @@ the more limited domain of the metadata model, this is acceptable since the type hierarchy is fairly small. But the object system data model is not designed to support, for example, a huge type tree like the Java runtime -libraries might define.

    This last point cannot be over-stressed: the object model is not -meant to be used for large scale application data storage. It is +libraries might define.

    This last point cannot be over-stressed: the object model is not +meant to be used for large scale application data storage. It is meant to represent and store metadata, not application data.

    Data Model

    Like most data models, the OpenACS Core data model has two levels:

    1. The knowledge level (i.e. the metadata model)

    2. The operational level (i.e. the concrete data model)

    You can browse the data models themselves from here:

    Future Improvements/Areas of Likely Change

    Nothing here yet.

    Authors

    Pete Su generated this document from material culled from other documents by Michael Yoon, Richard Li and Rafael Schloming. But, any remaining lies -are his and his alone.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/09/2000Pete Su
    0.2Edited for ACS 4 Beta9/30/2000Kai Wu
    0.3Edited for ACS 4.0.1, fixed some mistakes, removed use of term +are his and his alone.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/09/2000Pete Su
    0.2Edited for ACS 4 Beta9/30/2000Kai Wu
    0.3Edited for ACS 4.0.1, fixed some mistakes, removed use of term "OM"11/07/2000Pete Su
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 24 Nov 2002 21:29:17 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Object Model Requirements

    OpenACS 4 Object Model Requirements

    +OpenACS 4 Object Model Requirements

    OpenACS 4 Object Model Requirements

    By Pete Su
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -24,7 +24,7 @@ within the OpenACS, and typically corresponds to a single row within the relational database.

    Vision Statement

    The OpenACS 4 Object Model must address five high-level requirements that repeatedly exhibit themselves in the context of existing services in OpenACS 3.x, -as described below.

    Object Identifiers for General Services

    Generic services require a single unambiguous way of identifying +as described below.

    Object Identifiers for General Services

    Generic services require a single unambiguous way of identifying application objects that they manage or manipulate. In OpenACS 3.x, there are several different idioms that construct object identifiers from other data. Many modules use a (user_id, group_id, scope) triple combination @@ -46,12 +46,12 @@ that their definition and use is ad-hoc and inconsistent. This makes the construction of generic application-independent services difficult. Therefore, the OpenACS 4 Object Model should provide a centralized and uniform -mechanism for tagging application objects with unique identifiers.

    Support for Unified Access Control

    Access control should be as transparent as possible to the application +mechanism for tagging application objects with unique identifiers.

    Support for Unified Access Control

    Access control should be as transparent as possible to the application developer. Until the implementation of the general permissions system, every OpenACS application had to manage access control to its data separately. Later on, a notion of "scoping" was introduced into the core data model.

    "Scope" is a term best explained by example. Consider some -hypothetical rows in the address_book table:

    ...scopeuser_idgroup_id...
    ...user123...
    ...group456...
    ...public...

    The first row represents an entry in User 123's personal address book, +hypothetical rows in the address_book table:

    ...scopeuser_idgroup_id...
    ...user123...
    ...group456...
    ...public...

    The first row represents an entry in User 123's personal address book, the second row represents an entry in User Group 456's shared address book, and the third row represents an entry in the site's public address book.

    In this way, the scoping columns identify the security context in which a @@ -65,7 +65,7 @@ page, a security problem could result.

    Thus the OpenACS 4 Object Model must support a more general access control system that allows access control domains to be hierarchical, and specifiable with a single piece of data, instead of the old composite keys described -above.

    Extensible Data Models

    Another problem with previous OpenACS data models is that many of the central +above.

    Extensible Data Models

    Another problem with previous OpenACS data models is that many of the central tables in the system became bloated as they were extended to support an increasing number of modules. The users table is the best case in point: it became full of columns that exist for various special @@ -83,10 +83,10 @@ custom extensions to the existing data models, and the OM does the bookkeeping necessary to make this easier, providing a generic API for object creation that automatically keeps track of the location and relationships -between data.

    Design Note: While this doesn't really belong in a +between data.

    Design Note: While this doesn't really belong in a requirements document, the fact that we are constrained to using relational databases means that certain constraints on the overall design of the object -data model exist, which you can read about in Summary and Design Considerations.

    Modifiable Data Models

    Another recurring applications problem is how to store a modifiable data +data model exist, which you can read about in Summary and Design Considerations.

    Modifiable Data Models

    Another recurring applications problem is how to store a modifiable data model, or how to store information that may change extensively between releases or in different client installations. Furthermore, we want to avoid changes to an application's database queries in the face of any custom @@ -103,7 +103,7 @@ store values for those attributes.

    Thus the Object Model must provide a general mechanism for applications and developers to modify or extend data models, without requiring changes to the SQL schema of the system. This ensures that all applications use the same -base schema, resulting in a uniform and more maintainable system.

    Generic Relations

    Many OpenACS applications define simple relationships between application +base schema, resulting in a uniform and more maintainable system.

    Generic Relations

    Many OpenACS applications define simple relationships between application objects, and tag those relationships with extra data. In OpenACS 3.x, this was done using mapping tables. The user/groups module has the most highly developed data model for this purpose, using a single table called @@ -127,8 +127,8 @@ that store metadata on application objects. The object type system supports subtyping with inheritance, so new object types can be defined in terms of existing object types.

    The OM data model forms the main part of the OpenACS 4 Kernel data model. The -other parts of the Kernel data model include:

    • Parties and Groups

    • Permissions

    Each of these is documented elsewhere at length.

    Use-cases and User-scenarios

    (Pending as of 8/27/00)

    Requirements: Data Model

    The data model for the object system provides support for the following -kinds of schema patterns that are used by many existing OpenACS modules:

    10.0 Object Identification and Storage

    Object identification is a central mechanism in the new metadata system. +other parts of the Kernel data model include:

    • Parties and Groups

    • Permissions

    Each of these is documented elsewhere at length.

    Use-cases and User-scenarios

    (Pending as of 8/27/00)

    Requirements: Data Model

    The data model for the object system provides support for the following +kinds of schema patterns that are used by many existing OpenACS modules:

    10.0 Object Identification and Storage

    Object identification is a central mechanism in the new metadata system. The fact that every object has a known unique identifier means that the core can deal with all objects in a generic way. Thus the only action required of an application to obtain any general service is to "hook into" the @@ -149,15 +149,15 @@ application data. More importantly, object identifiers will enable developers to readily build and use generic services that work globally across a system.

    The object identifiers should be subject to the following -requirements:

    10.10 Uniqueness

    The object ID should be unique among all the IDs in the entire OpenACS system -in which the object lives.

    10.20 Useful as a Reference

    Applications should be able to use the unique object ID as a reference, -with which they can fetch any or all of the object's attributes.

    10.30 Storable

    Object IDs should be storable in tables. e.g. you should be able to use +requirements:

    10.10 Uniqueness

    The object ID should be unique among all the IDs in the entire OpenACS system +in which the object lives.

    10.20 Useful as a Reference

    Applications should be able to use the unique object ID as a reference, +with which they can fetch any or all of the object's attributes.

    10.30 Storable

    Object IDs should be storable in tables. e.g. you should be able to use them to implement mapping tables between objects, to represent -relationships.

    10.40 Moveable

    Objects should be mobile between databases. That is, information will +relationships.

    10.40 Moveable

    Objects should be mobile between databases. That is, information will often need to be moved between multiple servers (development, staging, and production), so a mechanism for moving this data is necessary. In addition, a mechanism for tagging these objects in a way similar to CVS would be useful -in determining which objects need to be synchronized.

    20.0 Object Types

    An object type refers to a specification of one or more +in determining which objects need to be synchronized.

    20.0 Object Types

    An object type refers to a specification of one or more attributes to be managed along with a piece of application data.

    The object system should provide a data model for describing and representing object types. This data model is somewhat analogous to the Oracle data dictionary, which stores information about all user defined @@ -170,33 +170,33 @@ is meant to be a generalization of this mechanism. The data model should allow developers to at least do everything they used to with user/groups, but without its administrative hassles.

    Therefore, the data model must be able to represent object types that have -the following characteristics:

    20.10 Type Name

    A human readable name for the object type.

    20.20 Type Attributes

    Attributes whose values are shared by all instances of the object -type.

    20.30 Object Attributes

    Attributes that are specific to each particular object belonging to a -given type.

    The data model must also enforce certain constraints on object types:

    20.40 Type Uniqueness

    Object type names must be unique.

    20.50 Attribute Name Uniqueness

    Attribute names must be unique in the scope of a single object type and -any of its parent types.

    30.0 Type Extension

    The Object Model must support the definition of object types that are +the following characteristics:

    20.10 Type Name

    A human readable name for the object type.

    20.20 Type Attributes

    Attributes whose values are shared by all instances of the object +type.

    20.30 Object Attributes

    Attributes that are specific to each particular object belonging to a +given type.

    The data model must also enforce certain constraints on object types:

    20.40 Type Uniqueness

    Object type names must be unique.

    20.50 Attribute Name Uniqueness

    Attribute names must be unique in the scope of a single object type and +any of its parent types.

    30.0 Type Extension

    The Object Model must support the definition of object types that are subtypes of existing types. A subtype inherits all the attributes of its parent type, and defines some attributes of its own. A critical aspect of the OM is parent types may be altered, and any such change must propagate to child subtypes.

    The OM data model must enforce constraints on subtypes that are similar to -the ones on general object types.

    30.10 Subtype Uniqueness

    Subtype names must be unique (this parallels requirement 10.40).

    30.20 Subtype Attribute Name Uniqueness

    Attribute names must be unique in the scope of a single object -subtype.

    30.30 Parent Type Prerequisite

    Subtypes must be defined in terms of parent types that, in fact, already -exist.

    30.40

    The extended attribute names in a subtype must not be the same as those in -its parent type.

    35.0 Methods

    35.10 Method and Type Association

    The OM data model should define a mechanism for associating procedural +the ones on general object types.

    30.10 Subtype Uniqueness

    Subtype names must be unique (this parallels requirement 10.40).

    30.20 Subtype Attribute Name Uniqueness

    Attribute names must be unique in the scope of a single object +subtype.

    30.30 Parent Type Prerequisite

    Subtypes must be defined in terms of parent types that, in fact, already +exist.

    30.40

    The extended attribute names in a subtype must not be the same as those in +its parent type.

    35.0 Methods

    35.10 Method and Type Association

    The OM data model should define a mechanism for associating procedural code, called methods, with objects of a given type. Methods are associated with the each object type - not each object -instance.

    35.20 Method Sharing

    All instances of a given object type should share the same set of defined -methods for that type.

    40.0 Object Attribute Value Storage

    In addition to information on types, the OM data model provides for the +instance.

    35.20 Method Sharing

    All instances of a given object type should share the same set of defined +methods for that type.

    40.0 Object Attribute Value Storage

    In addition to information on types, the OM data model provides for the centralized storage of object attribute values. This facility unifies the many ad-hoc attribute/value tables that exist in various OpenACS 3.x data models, such as:

    • User groups: Each instance of a group type can have custom data.

    • Photo DB: Users can define their own custom metadata to attach to photograph objects.

    • Ecommerce: Vendors can attach custom fields to the data model describing -their products.

    40.10 Generic Retrieval

    Attributes should be stored so that they are retrievable in a way that is +their products.

    40.10 Generic Retrieval

    Attributes should be stored so that they are retrievable in a way that is independent of the type of the object that they belong to. That is, the only data needed to retrieve an attribute should be the system-wide ID of an -object (see requirement 10.20 above) and the attribute name.

    40.20 Inherited Attributes

    The system should allow for the automatic retrieval of inherited attribute -values, for an object belonging to a subtype.

    40.30. Constraints on Attributes

    The system should allow the developer to put down constraints on the +object (see requirement 10.20 above) and the attribute name.

    40.20 Inherited Attributes

    The system should allow for the automatic retrieval of inherited attribute +values, for an object belonging to a subtype.

    40.30. Constraints on Attributes

    The system should allow the developer to put down constraints on the values that an attribute may hold, for the purposes of maintaining -application specific integrity rules.

    50.0 Object Contexts

    In OpenACS 3.x, there was a notion of "scope" for application +application specific integrity rules.

    50.0 Object Contexts

    In OpenACS 3.x, there was a notion of "scope" for application objects. An object could be belong to one of three scopes: public, group or user. This provided a crude way to associate objects with particular scopes in the system, but it was awkward to use and limited in flexibility.

    The OpenACS 4 Object Model provides a generalized notion of scope that allows @@ -205,64 +205,64 @@ object has no explicit permissions attached to it, then it inherits permissions from its context.

    The context data model also forms the basis of the subsites system, and is a basic part of the permissions system, -described in separate documents.

    The context data model should provide the following facilities:

    50.10 Unique ID

    Every context should have a unique ID in the system.

    50.20 Tree Structure

    The data model should support a tree structured organization of contexts. +described in separate documents.

    The context data model should provide the following facilities:

    50.10 Unique ID

    Every context should have a unique ID in the system.

    50.20 Tree Structure

    The data model should support a tree structured organization of contexts. That is, contexts can be logically "contained" within other contexts (i.e. contexts have parents) and contexts can contain other contexts -(i.e. contexts can have children).

    50.30 Data Model Constraints

    All objects must have a context ID. This ID must refer to an existing +(i.e. contexts can have children).

    50.30 Data Model Constraints

    All objects must have a context ID. This ID must refer to an existing context or be NULL. The meaning of a NULL context is determined by the -implementation.

    Note:

    The current system interprets the NULL context as meaning the default +implementation.

    Note:

    The current system interprets the NULL context as meaning the default "site-wide" context in some sense. I wanted to note this fact for others, but there is no need to make this a requirement of the system. I think it would be reasonable to have a NULL context be an error (psu -8/24/2000).

    55.0 Object Relations

    The data model should include a notion of pair-wise relations between +8/24/2000).

    55.0 Object Relations

    The data model should include a notion of pair-wise relations between objects. Relations should be able to record simple facts of the form "object X is related to object Y by relationship R," and also be -able to attach attributes to these facts.

    Requirements: API

    The API should let programmers accomplish the following actions:

    60.0 Object Type Creation

    60.10 Create a New Object Type

    The object system API should provide a procedure call that creates a new +able to attach attributes to these facts.

    Requirements: API

    The API should let programmers accomplish the following actions:

    60.0 Object Type Creation

    60.10 Create a New Object Type

    The object system API should provide a procedure call that creates a new object type by running the appropriate transactions on the object system data model. This API call is subject to the constraints laid out in the data -model. We call this operation "instantiating" an object.

    60.20 Create a New Object Subtype

    The object system API should provide a procedure call for creating +model. We call this operation "instantiating" an object.

    60.20 Create a New Object Subtype

    The object system API should provide a procedure call for creating subtypes of a given type. Operationally, this API is the same as requirement 60.10. Instances of subtypes automatically contain all attributes of the parent type in addition to all attributes of the subtype. This API is subject -to the constraints laid out in the data model.

    60.30 Create a New Relation Type

    There should be an API call to create a new type of object relation. +to the constraints laid out in the data model.

    60.30 Create a New Relation Type

    There should be an API call to create a new type of object relation. Relation types can be modeled as object types. The API below for manipulating -attributes can then be used to add attributes to relation types.

    70.0 Update an Object Type

    The object system API must allow the programmer to modify, add, and delete +attributes can then be used to add attributes to relation types.

    70.0 Update an Object Type

    The object system API must allow the programmer to modify, add, and delete attributes from any object type. Updates should be propagated to any child subtypes. This API is subject to the constraints laid out in the data -model.

    80.0 Delete an Object Type

    The system provides an API call for deleting an object type.

    80.10

    Deleting an object type destroys all instances of the type. It should be +model.

    80.0 Delete an Object Type

    The system provides an API call for deleting an object type.

    80.10

    Deleting an object type destroys all instances of the type. It should be an error to delete types that have dependent subtypes. This API is subject to -the constraints laid out in the data model.

    80.10.10

    However, the programmer should also be able to specify that all the +the constraints laid out in the data model.

    80.10.10

    However, the programmer should also be able to specify that all the subtypes and instances of those subtypes be destroyed before destroying the object type. This is similar to a "delete cascade" constraint in -SQL.

    90.0 Object Instance Creation and Destruction

    The system must provide API calls to manage the creation and destruction -of object instances.

    90.10 Create an Instance of an Object Type

    The system should provide an API call for creating a new instance of a +SQL.

    90.0 Object Instance Creation and Destruction

    The system must provide API calls to manage the creation and destruction +of object instances.

    90.10 Create an Instance of an Object Type

    The system should provide an API call for creating a new instance of a given object type. The new instance should be populated with values for each of the attributes specified in the definition of the type. In addition, it should be possible to create the new instance with an optional context ID -that refers to the default context that the object will live in.

    90.20 Delete an Object Instance

    The OM should provide an API call for object deletion. Objects can be +that refers to the default context that the object will live in.

    90.20 Delete an Object Instance

    The OM should provide an API call for object deletion. Objects can be deleted only when no other objects in the system refer to them. Since it might not be practical to provide a mechanism like "delete cascade" here in a reliable way, providing such a facility in the system is -optional.

    94.0 Object Relation Creation and Destruction

    The system must provide API calls to manage the creation and destruction -of object relations.

    94.10 Create an Object Relation

    The OM must provide an API call to declare that two objects are related to +optional.

    94.0 Object Relation Creation and Destruction

    The system must provide API calls to manage the creation and destruction +of object relations.

    94.10 Create an Object Relation

    The OM must provide an API call to declare that two objects are related to each other by a given relation type. This API call should also allow -programmers to attach attributes to this object relation.

    94.20 Destroy an Object Relation

    There should be an API call for destroying object relations and their -attributes.

    95.10 Create and Destroy Contexts

    The system should provide an API to create and destroy object -contexts.

    100.10 Set Attribute Values for an Object

    The system should provide an API for updating the attribute values of a -particular instance of an object type.

    110.10 Get Attribute Values for an Object

    The system should provide an API for retrieving attribute values from a -particular instance of an object type.

    120.10 Efficiency

    The Object Model must support the efficient storage and retrieval of +programmers to attach attributes to this object relation.

    94.20 Destroy an Object Relation

    There should be an API call for destroying object relations and their +attributes.

    95.10 Create and Destroy Contexts

    The system should provide an API to create and destroy object +contexts.

    100.10 Set Attribute Values for an Object

    The system should provide an API for updating the attribute values of a +particular instance of an object type.

    110.10 Get Attribute Values for an Object

    The system should provide an API for retrieving attribute values from a +particular instance of an object type.

    120.10 Efficiency

    The Object Model must support the efficient storage and retrieval of object attributes. Since the OM is intended to form the core of many general services in the OpenACS, and these services will likely make extensive use of the OM tables, queries on these tables must be fast. The major problem here seems to be supporting subtyping and inheritance in a way that does not severely -impact query performance.

    130.10 Ease of Use

    Most OpenACS packages will be expected to use the Object Model in one way or +impact query performance.

    130.10 Ease of Use

    Most OpenACS packages will be expected to use the Object Model in one way or another. Since it is important that the largest audience of developers possible adopts and uses the OM, it must be easy to incorporate into applications, and it must not impose undue requirements on an application's data model. In other words, it should be easy to "hook into" the object model, and that ability should not have a major impact -on the application data model.

    Note: Is the API the only way to obtain values? How does -this integrate with application level SQL queries?

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/10/2000Bryan Quinn
    0.2Major re-write08/11/2000Pete Su
    0.3Draft completed after initial reviews08/22/2000Pete Su
    0.4Edited, updated to conform to requirements template, pending freeze08/23/2000Kai Wu
    Final edits before freeze08/24/2000Pete Su
    0.5Edited for consistency08/27/2000Kai Wu
    0.6Put Object ID stuff first, because it makes more sense08/28/2000Pete Su
    0.7Added requirement that knowledge-level objects must be moveable between +on the application data model.

    Note: Is the API the only way to obtain values? How does +this integrate with application level SQL queries?

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/10/2000Bryan Quinn
    0.2Major re-write08/11/2000Pete Su
    0.3Draft completed after initial reviews08/22/2000Pete Su
    0.4Edited, updated to conform to requirements template, pending freeze08/23/2000Kai Wu
    Final edits before freeze08/24/2000Pete Su
    0.5Edited for consistency08/27/2000Kai Wu
    0.6Put Object ID stuff first, because it makes more sense08/28/2000Pete Su
    0.7Added requirement that knowledge-level objects must be moveable between databases.08/29/2000Richard Li
    0.8Rewrote intro to match language and concepts in the design document. Also cleaned up usage a bit in the requirements section. Added short vague requirements on relation types.09/06/2000Pete Su
    0.9Edited for ACS 4 Beta release.09/30/2000Kai Wu
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/objects.html 24 Nov 2002 21:29:17 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/objects.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,11 +1,11 @@ -OpenACS 4.6 Data Models and the Object System

    OpenACS 4.6 Data Models and the Object System

    +OpenACS 4.6.2 Data Models and the Object System

    OpenACS 4.6.2 Data Models and the Object System

    By Pete Su
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff.

    Overview

    -Developing data models in OpenACS 4.6 is much like developing data models +Developing data models in OpenACS 4.6.2 is much like developing data models for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of SQL tables. In our Notes @@ -28,12 +28,12 @@ Thinking further ahead, we can imagine doing any of the following things with Notes as well:

    • Define access control policies on notes.

    • Attach user comments on notes.

    • Allow users to define custom fields to store on their notes.

    • Automatically generate input forms or output displays for notes.

    • Allow other applications to use notes in ways we don't know of yet.

    -In OpenACS 4.6, the key to enabling these types of services on your +In OpenACS 4.6.2, the key to enabling these types of services on your application data is to take advantage of the Object System. The first question, then, is "Just what are objects, and what do you use them for anyway?". The short answer: objects are anything represented in the application's data model that will need to be -managed by any central service in OpenACS 4.6, or that may be reusable in +managed by any central service in OpenACS 4.6.2, or that may be reusable in the context of future applications. Every object in the system is represented using a row in the acs_objects table. This table defines all the standard attributes that are stored on every @@ -63,7 +63,7 @@ new object type. Object types are analogous to classes in programming languages such as C++ and Java. In Java, a class defines a set of attributes that store data and a set of methods -that run code. In OpenACS 4.6, we use one or more Oracle tables to store the +that run code. In OpenACS 4.6.2, we use one or more Oracle tables to store the data attributes, and we define a PL/SQL package to hold procedures to define the programming interface to the data model.

    @@ -80,8 +80,8 @@

    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

    +when we created the package. Then, do the following: +

    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  
    @@ -141,7 +141,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 @@ -166,7 +166,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: @@ -197,7 +197,7 @@ You might be wondering what all the extra parameters are to these calls, since we haven't mentioned them before. These parameters are needed to fill out information that will be stored about the object -that's not stored directly in the table you defined. The OpenACS 4.6 Object +that's not stored directly in the table you defined. The OpenACS 4.6.2 Object System defines these attributes on the type acs_object since all objects should have these attributes. Internally, there are tables that store this information for you. Most of the data is pretty @@ -214,7 +214,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 @@ -317,7 +317,7 @@ models that are meant to be integrated with the OpenACS object system.

    -There are two basic rules you should follow when designing OpenACS 4.6 data +There are two basic rules you should follow when designing OpenACS 4.6.2 data models: @@ -372,7 +372,7 @@ requires a good amount of thought at design time even for simple applications.

    Summary

    -Hooking into the OpenACS 4.6 object system brings the application developer +Hooking into the OpenACS 4.6.2 object system brings the application developer numerous benefits, and doing it involves only four easy steps: @@ -396,4 +396,4 @@ especially true for the context_id field.

    -

    ($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/openacs-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-overview.html,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 24 Nov 2002 21:29:17 -0000 1.3.2.1 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 29 Mar 2003 20:44:54 -0000 1.3.2.2 @@ -1,28 +1,36 @@ -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 enterprise-level web application, - OpenACS is a solid, proven foundation that will give you a 3-6 month headstart. +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 + enterprise-level web application, OpenACS is a solid, + proven foundation that will give you a 3-6 month + headstart.

    - OpenACS is also a collection of pre-built applications and services that - you can use to build your web site/application. Through a modular architecture, - OpenACS has packages for user/groups management, content management, e-commerce, - news, FAQ, calendar, forums, bug tracking, full-text searching, and - much more. + OpenACS is also a collection of pre-built applications and + services that you can use to build your web + site/application. Through a modular architecture, OpenACS + has packages for user/groups management, content + management, e-commerce, news, FAQ, calendar, forums, bug + tracking, full-text searching, and much + more.

    - OpenACS relies on AOLserver, - the free, multithreaded, scalable, Tcl-enabled, web/application server used by - America On-Line for most of its web sites, and a true acid-compliant - Relational Database Management System (RDBMS). Currently OpenACS supports - PostgreSQL, an open source RDBMS, and Oracle. (read more) + OpenACS relies on AOLserver, the + free, multithreaded, scalable, Tcl-enabled, + web/application server used by America On-Line for most of + its web sites, and a true acid-compliant Relational + Database Management System (RDBMS). Currently OpenACS + supports PostgreSQL, an open source RDBMS, and + Oracle. (read + more)

    - The OpenACS toolkit is based on the ArsDigita Community System. ArsDigita - (now part of Red Hat, Inc.) kindly made their work available under the - GPL, + The OpenACS toolkit is based on the ArsDigita Community + System. ArsDigita (now part of Red Hat, Inc.) kindly made + their work available under the GPL, making all of this possible.

    - The OpenACS community would like to hear your comments and help you - in your endeavors with the system. Stop by our web site - and feel free to ask a question, post ideas or whatever. -

    View comments on this page at openacs.org
    + The OpenACS community would like to hear your comments and + help you in your endeavors with the system. Stop by our + web site and feel + free to ask a question, post ideas or whatever. +

    View comments on this page at openacs.org
    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.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/openacs.html 24 Nov 2002 21:29:17 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/openacs.html 29 Mar 2003 20:44:54 -0000 1.6.2.3 @@ -1,80 +1,166 @@ -Install OpenACS 4.6

    Install OpenACS 4.6

    +Install OpenACS 4.6.2

    Install OpenACS 4.6.2

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

    Downloading OpenACS

    Set up the file system for an OpenACS Service

    1. Unpack the OpenACS tarball. If you are following the + instructions linearly, you should done this already, in which case + you can skip this step. If not, make sure you have the OpenACS + tarball in /tmp and proceed: +

      [root@yourserver root]# cd /tmp
      +[root@yourserver tmp]# tar xzf openacs-4-6.tgz
      +
      cd /tmp
      +tar xzf openacs-4-6.tgz
    2. The reference install stores all OpenACS instances in + /web, with one subdirectory per + instance. Create that directory:

      [root@yourserver root]# mkdir /web
      +[root@yourserver root]# chgrp web /web
      +[root@yourserver root]# chmod 770 /web
      +[root@yourserver root]#
      +
      mkdir /web
      +chgrp web /web
      +chmod 770 /web
    3. Set up your user account.

      + AOLserver needs to be started as the root user if you want to use + port 80. Once it starts, though, it will drop the root privileges and + run as another user, which you must specify on the command line. It's + important that this user has as few privileges as possible. Why? + Because if an intruder somehow breaks in through AOLserver, you don't + want her to have any ability to do damage to the rest of your + server.

      At the same time, AOLserver needs to have write access to + some files on your system in order for OpenACS to function + properly. So, we'll run AOLserver with a different user account + 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 "server0" might be the service name for the + server0.net + community.

      For the 4.6.2-P and 4.6.2-O Reference Platform, + we'll use a server named server0 and + a user named server0. We'll leave the password + blank 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 web group so that it + can use database commands associated with that group. +

      [root@yourserver root]# useradd -g web server0
      +[root@yourserver root]#

      Set up database environment variables. They are + necessary for working with the database. +

      [root@yourserver root]# su - server0
      +[server0@yourserver server0]$ 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=$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, + make sure that the '8.1.7' matches your Oracle version. +

        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

      Test this by logging out and back in as + server0 and checking the paths.

      [server0@yourserver server0]$ exit
      +logout
      +[root@yourserver src]# su - server0
      +[postgres@yourserver pgsql]$ env | grep PATH
      +

      For PostGreSQL, you should see:

      +LD_LIBRARY_PATH=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:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin

      For Oracle:

      ORACLE_BASE=/ora8/m01/app/oracle
      +ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7
      +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/ora8/m01/app/oracle/product/8.1.7/bin
      +LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib
      +ORACLE_SID=ora8
      +ORACLE_TERM=vt100
      +ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
      [server0@yourserver server0]$ exit
      +logout
       
      -		  Create a directory called web
      -		  inside your home directory and untar the downloaded components
      -		  there. Set the permissions as directed. The OpenACS 4.6
      -		  tarball is currently named
      -		  openacs-4-6-release.tgz. Replace
      -		  openacs-4-6-release.tgz in the
      -		  commands below with whatever the current tarball is named.
      +[root@yourserver root]#
    4. Move the OpenACS tarball to be the new root directory for + the server0 service. Secure the directory so that only the owner can access it.

      [root@yourserver root]# mv /tmp/openacs-4-6 /web/server0
      +[root@yourserver root]# chown -R server0.web /web/server0
      +[root@yourserver root]# chmod -R 700 /web/server0
      +
      mv /tmp/openacs-4-6 /web/server0
      +chown -R server0.web /web/server0/
      +chmod -R 700 /web/server0
    5. Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to add it to your local CVS repository.

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

        [root@yourserver root]# mkdir /cvsroot/server0
        +[root@yourserver root]# chown server0.web /cvsroot/server0
        +[root@yourserver root]#
        +
        mkdir /cvsroot/server0
        +chown server0.web /cvsroot/server0
      2. Add the repository location to the user environment.

        [root@yourserver root]# su - server0
        +[server0@yourserver server0]$ emacs .bashrc

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

        export CVSROOT=/cvsroot
        [server0@yourserver server0]$ exit
        +logout
         
        -		

        -joeuser:~$ mkdir -p web
        -joeuser:~$ chown joeuser.web web
        -joeuser:~$ cd web
        -joeuser:~/web$ tar xzf /tmp/openacs-4-6-release.tgz
        -joeuser:~/web$ chown -R joeuser.web openacs-4
        -joeuser:~/web$ chmod -R g+w openacs-4
      3. - You should now have an - openacs-4/ directory tree in - ~/web. Rename this directory to - whatever you want your web service to be identified as. The name - of your web service is referred to as the - service_name. Since you can run multiple - separate web services under AOLserver, this identification is - used internally by AOLserver to differentiate your services from - one another. 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 - "birdnotes" might be the service name for the birdnotes.net - community. We'll use birdnotes as an example - in these docs. -

        -joeuser:~/web$ ls -l
        -drwxrwxr-x    8 joeuser  web      4096 Nov 27 09:32 openacs-4
        -joeuser:~/web$ mv openacs-4 birdnotes
        -joeuser:~/web$ ls -l
        -drwxrwxr-x    8 joeuser  web      4096 Dec 20 14:37 birdnotes
      4. +[root@yourserver root]#

      5. 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, + server0 + refers to the cvs repository to use; it uses the CVSROOT + plus this string, + i.e. + /cvsroot/server0. + "OpenACS" is the vendor tag, and "openacs-4-6" is the + release tag. These tags will be useful in upgrading and + branching. -m sets the version comment.

        [root@yourserver root]# su - server0
        +[server0@yourserver server0]$ cd /web/server0
        +[server0@yourserver server0]$ cvs import -m "initial install" server0 OpenACS openacs-4-6
        +N server0/license.txt
        +N server0/readme.txt
        +(many lines omitted)
        +N server0/www/SYSTEM/flush-memoized-statement.tcl
         
        -		  Finally create a directory for the AOLserver logs.
        +No conflicts created by this import
         
        -		

        -joeuser:~/web$ mkdir birdnotes/log

    - Skip ahead if you want to Prepare PostgreSQL for OpenACS -

    Prepare Oracle for OpenACS

    +[server0@yourserver server0]$ +

    su - server0
    +cd /web/server0
    +cvs import -m "initial install" server0 OpenACS openacs-4-6

    Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files.

    [server0@yourserver server0]$ cd ..
    +[server0@yourserver web]$ mv server0 server0.orig
    +[server0@yourserver web]$ cvs checkout server0
    +cvs checkout: Updating server0
    +U server0/license.txt
    +(many lines omitted)
    +U server0/www/SYSTEM/dbtest.tcl
    +U server0/www/SYSTEM/flush-memoized-statement.tcl
    +[server0@yourserver web]$ exit
    +logout
     
    +[root@yourserver web]#
    +
    cd ..
    +mv server0 server0.orig
    +cvs checkout server0
    +exit
  • Set up several additional directories in the service root: + etc is for configuration files + and log is for log + files. If you did the CVS step, note that these new directories are excluded from that step so that you can decide whether or not you want your logs and config files in source control.

    [root@yourserver root]# su - server0
    +[server0@yourserver server0]$ mkdir /web/server0/etc /web/server0/log
    +[server0@yourserver web]$ exit
    +logout
    +
    +[root@yourserver web]#
    +
    su - server0
    +mkdir /web/server0/etc /web/server0/log
    +exit
  • Prepare Oracle for OpenACS

    OPTIONAL - if you won't be using Oracle, skip to Prepare PostgreSQL for OpenACS

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

    • +

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

        -joeuser:~$ groups
        -dba web

        +

        +server0:~$ groups
        +dba web
        If you do not see these groups, take the following action: -

        -joeuser:~$ su -      
        +		  
        +server0:~$ su -      
         Password: ************
        -root:~# adduser joeuser dba

        +root:~# adduser server0 dba

        If you get an error about an undefined group, then add that group manually: -

        +
         root:~# groupadd dba
        -root:~# groupadd web

        +root:~# groupadd web

        Make sure to logout as root when you are finished with this step and log back in as @@ -83,26 +169,26 @@ Connect to Oracle using svrmgrl and login: -

        -joeuser:~$ svrmgrl
        +		  
        +server0:~$ svrmgrl
         
         SVRMGR> connect internal
        -Connected.

        +Connected.

      2. Determine where the system tablespaces are stored: -

        -SVRMGR>  select file_name from dba_data_files;

        +

        +SVRMGR>  select file_name from dba_data_files;
        Example results: -

        +		  
         /ora8/m01/app/oracle/oradata/ora8/system01.dbf
         /ora8/m01/app/oracle/oradata/ora8/tools01.dbf
         /ora8/m01/app/oracle/oradata/ora8/rbs01.dbf
         /ora8/m01/app/oracle/oradata/ora8/temp01.dbf
         /ora8/m01/app/oracle/oradata/ora8/users01.dbf
         /ora8/m01/app/oracle/oradata/ora8/indx01.dbf
        -/ora8/m01/app/oracle/oradata/ora8/drsys01.dbf

        +/ora8/m01/app/oracle/oradata/ora8/drsys01.dbf

      3. Using the above output, you should determine where to store your tablespace. As a general rule, you'll want to @@ -122,13 +208,13 @@ exit from svrmgrl and login as root for this step:

         SVRMGR> exit
        -joeuser:~$ su -
        +server0:~$ su -
         Password: ************
         root:~# mkdir -p /ora8/m02/oradata/ora8/
        -root:~# chown joeuser.web /ora8/m02/oradata/ora8
        +root:~# chown server0.web /ora8/m02/oradata/ora8
         root:~# chmod 775 /ora8/m02/oradata/ora8
         root:~# exit
        -joeuser:~$
      4. +server0:~$

      5. Create a tablespace for the service. It is important that the tablespace can autoextend. This @@ -140,11 +226,11 @@ tablespace.

        -joeuser:~$ svrmgrl
        +server0:~$ svrmgrl
         
         SVRMGR> connect internal;
        -SVRMGR> create tablespace birdnotes 
        -             datafile '/ora8/m02/oradata/ora8/birdnotes01.dbf' 
        +SVRMGR> create tablespace server0 
        +             datafile '/ora8/m02/oradata/ora8/server001.dbf' 
                      size 50M 
                      autoextend on 
                      next 10M
        @@ -153,26 +239,26 @@
                      uniform size 32K;
      6. Create a database user for this service. Give the user access to the tablespace and rights to connect. We'll use - birdnotespassword as our password.

        + server0password as our password.

        Write down what you specify as service_name - (i.e. birdnotes) and + (i.e. server0) and database_password - (i.e. birdnotespassword). You + (i.e. server0password). You will need this information for configuring exports and AOLserver.

        -SVRMGR> create user birdnotes identified by birdnotespassword default tablespace birdnotes
        -temporary tablespace temp quota unlimited on birdnotes;
        -SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to birdnotes;
        -SVRMGR> revoke unlimited tablespace from birdnotes;
        -SVRMGR> alter user birdnotes quota unlimited on birdnotes;
        +SVRMGR> create user server0 identified by server0password default tablespace server0
        +temporary tablespace temp quota unlimited on server0;
        +SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to server0;
        +SVRMGR> revoke unlimited tablespace from server0;
        +SVRMGR> alter user server0 quota unlimited on server0;
         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. + previous OpenACS installation, consult these commands in the section called “Deleting a tablespace” below.

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

        -joeuser:~$ sqlplus birdnotes/birdnotespassword
        +server0:~$ sqlplus server0/server0password
         SQL> select sysdate from dual;
         
         SYSDATE
        @@ -184,102 +270,160 @@
         		  If you can't login, try redoing step 1 again. If the date is
         		  in the wrong format, make sure you followed the steps outlined in
         		  the section called “Troubleshooting Oracle Dates”
        -		  

      8. - Next we'll set up AOLserver so that it has the proper environment - variables set before launching. Download this nsd-oracle script into - /tmp/nsd-oracle.txt : -

        -joeuser:~$ su -
        -Password: ********
        -root:~# cd /usr/local/aolserver/bin
        -root:/usr/local/aolserver/bin# cp /tmp/nsd-oracle.txt ./nsd-oracle
        -root:/usr/local/aolserver/bin# chmod 750 nsd-oracle
        -root:/usr/local/aolserver/bin# exit

    Prepare PostgreSQL for OpenACS

    - Preparing PostgreSQL is just a little bit simpler than preparing - Oracle. We simply need to create a database with the name of our - service-name - (i.e. birdnotes) -

    -joeuser:~/web$ createdb birdnotes
    -CREATE DATABASE

    Next we'll set up AOLserver so that it has the proper environment - variables set before launching. Download this nsd-postgres script into - /tmp/nsd-postgres.txt :

    -joeuser:~/web$ cd
    -joeuser:~$ su -
    -Password: ********
    -root:~# cd /usr/local/aolserver/bin
    -root:/usr/local/aolserver/bin# cp /tmp/nsd-postgres.txt ./nsd-postgres
    -root:/usr/local/aolserver/bin# chmod 755 nsd-postgres
    -root:/usr/local/aolserver/bin# exit

    Configuring AOLserver

    - The AOLserver architecture lets you run an arbitrary number of - virtual servers. A virtual server is an HTTP service running on a - specific port, e.g. port 80. In order for the OpenACS to work, you - need to configure a virtual server. Because the process is involved, - we have prepared a sample virtual server configuration file. -

    1. - Download openacs4.tcl.txt - into /tmp. -

    2. +

    Prepare PostgreSQL for an OpenACS Service

    1. Create a user in the database matching the service name.

      [root@yourserver root]# su - postgres
      +[postgres@yourserver pgsql]$ createuser server0
      +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@yourserver pgsql]$ exit
      +logout
       
      -		  Modify it for your needs and save it inside your
      -		  ~/web/birdnotes directory.  (Of
      -		  course change birdnotes to
      -		  whatever you're using as your service-name.)
      +[root@yourserver root]#
    2. Create a database with the same name as our service name, server0.

      [root@yourserver root]# su - server0
      +[server0@yourserver server0]$ createdb server0
      +CREATE DATABASE
      +[server0@yourserver server0]$
      +
      su - server0
      +createdb server0
    3. 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.

      [server0@yourserver server0]$ export EDITOR=emacs;crontab -e

      Add this line to the file. 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.

      0 1 * * * /usr/local/pgsql/bin/vacuumdb server0
    4. Add Full Text Search Support - OPTIONAL

      If you are installing Full Text Search, add required packages to the new database.

      [server0@yourserver server0]$ /usr/local/pgsql/bin/psql server0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
      +BEGIN
      +CREATE
      +(many lines omitted)
      +INSERT 0 1
      +COMMIT
      +[server0@yourserver server0]$ /usr/local/pgsql/bin/psql server0 -f /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts/openfts.sql
      +CREATE
      +CREATE
      +[server0@yourserver server0]$
      +
      /usr/local/pgsql/bin/psql server0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
      +/usr/local/pgsql/bin/psql server0 -f /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts/openfts.sql
    5. [server0@yourserver server0]$ exit
      +logout
       
      -		

    -joeuser:~$ cp /tmp/openacs4.tcl.txt ./web/birdnotes/nsd.tcl
    -joeuser:~$ chmod 600 ./web/birdnotes/nsd.tcl
    -joeuser:~$ emacs ./web/birdnotes/nsd.tcl

    - Specifically, you'll have set the following variables -

    • - server - This is the name of - the directory where your code resides. In our example above, we - used birdnotes. -

    • db_name - In almost all cases, +[root@yourserver root]#

    Configure an AOLserver Service for OpenACS

    1. + The AOLserver architecture lets you run an arbitrary number of + virtual servers. A virtual server is an HTTP service running on a + 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. Copy it to the /web/server0/etc directory and open it in an editor to adjust the parameters.

      [root@yourserver root]# su - server0
      +[server0@yourserver server0]$ cd /web/server0/etc
      +[server0@yourserver etc]# cp /web/server0/packages/acs-core-docs/www/files/config.tcl.txt config.tcl
      +[server0@yourserver 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 server0. + +

      • db_name - In almost all cases, this can be kept as a reference to $server. If for some reason, the tablespace you are using is different than your servername, then you can set it here. You should have a good reason for doing this.

      • - servername - This is just a - *pretty* name for your server. For example, we might call ours - "Birdnotes.net Community" -

      • httpport - If you want your - server on a different port, enter it here

      • - - user_account - The account that will both - own OpenACS files and connect to the database (for Postgresql). - -

      + servername - This is just a *pretty* name for your server.

    2. user_account - The account that + will both own OpenACS files and connect to the database (for + Postgresql).

    3. debug - Set to true for a very verbose error log, including many lines for every page view, success or failure.

    AOLServer is very configurable. These settings should get you started, but for more options, read the AOLServer docs. -

    +

  • OPTIONAL: To run OpenFTS, 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
  • OPTIONAL: To run nsopenssl:

    1. Uncomment this line from config.tcl.

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

      [server0@yourserver etc]$ mkdir /web/server0/etc/certs
      +[server0@yourserver etc]$ chmod 700 /web/server0/etc/certs
      +[server0@yourserver etc]$ 
      +
      mkdir /web/server0/etc/certs
      +chmod 700 /web/server0/etc/certs
    3. 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.

      [server0@yourserver server0]$ cd /web/server0/etc/certs
      +[server0@yourserver 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
      +[server0@yourserver 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@yourserver misc]# openssl rsa -in newreq.pem -out keyfile.pem
      +read RSA key
      +Enter PEM pass phrase:
      +writing RSA key
      +[server0@yourserver certs]$ 

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

      [server0@yourserver certs]$ cp newreq.pem certfile.pem
      +[root@yourserver 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
      +S/Sd2MYA0JVmQuIt5bYowXR1KYKDka1d3DUgtoVTiFepIRUrMkZlCli08mWVjE6T
      +(11 lines omitted)
      +1MU24SHLgdTfDJprEdxZOnxajnbxL420xNVc5RRXlJA8Xxhx/HBKTw==
      +-----END RSA PRIVATE KEY-----
  • Verify AOLserver startup

    1. Kill any current running AOLserver processes and start a new one. (Note, if you are using Oracle, rather than PostgreSQL, replace nsd-postgres with - nsd-oracle):

      -joeuser:~$ killall nsd
      -; Should probably see:
      +	  nsd-oracle).  If you are using port 80, you must be root for this step. 

      [server0@yourserver etc]$ killall nsd
       nsd: no process killed
      -joeuser:~$ /usr/local/aolserver/bin/nsd-postgres -t ~/web/birdnotes/nsd.tcl

      +[server0@yourserver server0]$ /usr/local/aolserver/bin/nsd-postgres -t /web/server0/etc/config.tcl +[server0@yourserver server0]$ [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 as you did - in the Test AOLserver section. You should - specify a URL like: -

      -http://ip_name:ip_port/

      - You should see a page that looks like this - if so, go on to Using the OpenACS Installer. + 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 /web/server0.orig.

      If you don't see the login page, view your error log - (~/web/birdnotes/log/error.log) + (/web/server0/log/server0-error.log) to make sure the service is starting without any problems. If you - need to make changes, don't forget to kill any running servers. + need to make changes, don't forget to kill any running servers with killall nsd. -

      -joeuser:~$ killall nsd

    Using the OpenACS Installer

    +

  • OPTIONAL - Automate AOLserver keepalive

    Assuming AOLserver started cleanly in the previous step, we'll set it up so that it's always running, and automatically restarts whenever it dies or is stopped. This step is strongly recommended, even for development sites, because it makes install and maintenance much simpler.

    The Reference Platform uses Daemontools to control AOLserver. An earlier method using init, less flexible and reliable, 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. Daemontools then creates additional files and directories to track status and log. Create the appropriate directory as /web/server0/etc/daemontools, copy the prepared run file, and set permissions. If your server is not called server0, edit /web/server0/etc/run accordingly.

      [server0@yourserver log]$ cd /web/server0/etc
      +[server0@yourserver etc]$ mkdir daemontools
      +[server0@yourserver etc]$ cp /web/server0/packages/acs-core-docs/www/files/run.txt daemontools/run
      +[server0@yourserver etc]$ chmod 700 daemontools/run
      +
      cd /web/server0/etc
      +mkdir daemontools
      +cp /web/server0/packages/acs-core-docs/www/files/run.txt daemontools/run
      +chmod 700 daemontools/run
    3. Kill 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.

      [server0@yourserver etc]$ killall nsd
      +nsd: no process killed
      +[server0@yourserver etc]$ exit
      +
      +[root@yourserver root]# ln -s /web/server0/etc/daemontools/ /service/server0

      Verify that AOLserver is running.

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

      • + + svc -d /service/server0 - + Bring the server down + +

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

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

      • + + svc -t /service/server0 - + Stop and immediately restart the server. + +

      • + + svc -k /service/server0 - + 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. + +

    5. + At this point, these commands will work only for the + root user. Grant permission for the web group to use svc commands on the server0 server.

      [root@yourserver root]# svgroup web /service/server0
      +[root@yourserver root]#
    6. Verify that the controls work. You may want to tail -f /web/server0/log/server0-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. +

  • Configure a Service with the OpenACS Installer

    Now that you've got AOLserver up and running, let's install OpenACS - 4.6. + 4.6.2.

    • You should see a page from the webserver titled OpenACS Installation: @@ -331,270 +475,75 @@ 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. -

      -joeuser:~$ /usr/local/aolserver/bin/nsd-postgres -t ~/web/birdnotes/nsd.tcl
    • +

      [server0@yourserver server0]$ /usr/local/aolserver/bin/nsd-postgres -t /web/server0/config.tcl
    • 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 - 4.6 is now up and running! -

    Keep AOLserver alive

    - Now, we'll describe how to start AOLserver automatically on boot, - or whenever else the service dies. -

    - There are 2 ways of doing this - via inittab or via daemontools. The - second way is by far the better way. Using daemontools gives you much - finer control over your servers and avoids the hassle of messing with - /etc/inittab. But, we'll describe - the inittab way as this may be easier for some users. I encourage - everyone to follow the links provided which describe how to Install daemontools. -

    Important: You need to set up - either inittab or daemontools, not both!

    Editing inittab

    - This step should be completed as root. This can break every service - on your machine, so proceed with caution. -

    • - There are 2 general steps to getting this working. -

      1. - Install a script called - restart-aolserver. This - script doesn't actually restart AOLserver - it just kills - it. -

      2. - Ask the OS to restart our service whenever it's not - running. We do this by adding a line to - /etc/inittab. -

      - Calling restart-aolserver - kills our service. The OS notices that our service is not - running, so it automatically restarts it. Thus, calling - restart-aolserver effectively - restarts our service. -

    • - Copy this file into - /tmp/restart-aolserver.txt. -

    • - This script needs to be SUID-root, which means - that the script will run as root. This is necessary to ensure - that the AOLserver processes are killed regardless of who owns - them. However the script should be executable by the - web group to ensure that the - users updating the web page can use the script, but that - general system users cannot run the script. You also need to - have Perl installed and also a symbolic link to it in - /usr/local/bin. -

      -joeuser:~$ su - 
      -Password: ***********
      -root:~# cp /tmp/restart-aolserver.txt /usr/local/bin/restart-aolserver
      -root:~# chown root.web /usr/local/bin/restart-aolserver
      -root:~# chmod 4750 /usr/local/bin/restart-aolserver
      -root:~# ln -s /usr/bin/perl /usr/local/bin/perl
      -root:~# exit
    • - Test the restart-aolserver - script. We'll first kill all running servers to clean the - slate. Then, we'll start one server and use - restart-aolserver to kill - it. If it works, then there should be no more servers - running. You should see the following lines.

      -joeuser:~$ killall nsd
      -nsd: no process killed
      -joeuser:~$ /usr/local/aolserver/bin/nsd-postgres -t ~/web/birdnotes/nsd.tcl
      -joeuser:~$ restart-aolserver birdnotes
      -Killing 23727 
      -joeuser:~$ killall nsd
      -nsd: no process killed

      - The number 23727 indicates the process id(s) (PIDs) of the - processes being killed. It is important that no processes are killed by the second - call to killall. If there are - processes being killed, it means that the script is not - working.

    • - Assuming that the restart-aolserver - script worked, login as root and open - /etc/inittab for - editing.

      -joeuser:~$ su -
      -Password: ************
      -root:~# emacs -nw /etc/inittab
    • - Copy this line into the bottom of the file as a template, - making sure that the first field - nss1 is unique. -

      -nss1:345:respawn:/usr/local/aolserver/bin/nsd-postgres -i -u nobody -g web -t /home/joeuser/web/birdnotes/nsd.tcl
    • - Important: Make sure there is a - newline at the end of the file. If there is not a newline at - the end of the file, the system may suffer catastrophic - failures. -

    • - Still as root, enter the following command to re-initialize - /etc/inittab.

      -root:~# killall nsd    
      -nsd: no process killed
      -root:~# /sbin/init q
    • - See if it worked by running the - restart-aolserver script - again.

      -root:~# restart-aolserver birdnotes
      -Killing 23750

    - If processes were killed, congratulations, your server is now - automated for startup and shutdown. -

    Install daemontools

    + 4.6.2 is now up and running! +

  • OPTIONAL - Install Full Text Search.

    1. Click Package Manager on the right side of the default home page. If prompted, log in with the account and password you entered during install.

    2. Click on the Install +packages link.

    3. On the next screen, after it loads, click on Uncheck all boxes, then click the second checkbox next to OpenFTS Driver 4.2. This will automatically check the first box. Then click Next.

    4. Click Install Packages

    5. Restart the service.

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

    7. Click on Site Map on the top right side of the screen.

    8. 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 +

    9. Mount the Search interface in the site map.

      1. Click the +new sub folder link on the +Main Site line.

      2. Type search +and click New.

      3. Click the new +application link on the search + line.

      4. Type search +where it says +untitled, choose +search from the +drop-down list, and click +New. +

    10. Restart the service.

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

    12. 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.

    13. Add the FTS Engine service contract

      1. Click on the Main +Site.

      2. Click on the ACS +Service Contract link near the bottom of the home page.

      3. On the FtsEngineDriver +line, click +Install. +

    14. Restart the service.

      [server0@yourserver server0]$ svc -t /service/server0
      +[server0@yourserver server0]$
    15. Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.

  • Back up the New Service - OPTIONAL

    This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/server0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.

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

    • PostGreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

      [server0@yourserver server0]$ mkdir /web/server0/database-backup
      +[server0@yourserver server0]$ pg_dump -f /web/server0/database-backup/initial_backup.dmp server0
      +[server0@yourserver server0]$ ls -al /web/server0/database-backup
      +total 1425
      +drwxr-xr-x    2 server0  web          1024 Mar  9 14:13 .
      +drwx------   11 server0  web          1024 Mar  9 14:11 ..
      +-rw-r--r--    1 server0  web       1449826 Mar  9 14:13 initial_backup.dmp
      +[server0@yourserver server0]$
      +
      mkdir /web/server0/database-backup
      +pg_dump -f /web/server0/database-backup/initial_backup.dmp server0
      +ls -al /web/server0/database-backup
    • Oracle - INCOMPLETE.�

    Set up Automated Backup - OPTIONAL

    Backup can encompass all files in /web/server0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)

    A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”

    [server0@yourserver server0]$ export EDITOR=emacs;crontab -e

    Add this line to the file. 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.

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /web/server0/database-backup/server0_$(date +%Y-%m-%d).dmp server0

    Set up Log Analysis Reports - OPTIONAL

    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@yourserver src]# su - service0
      +[service0@yourserver service0]$ cd /web/service0
      +[service0@yourserver service0]$ cp /web/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
      +[service0@yourserver service0]$ mkdir www/log
      +[service0@yourserver service0]$ cp -r /usr/share/analog-5.31/images www/log/
      +[service0@yourserver service0]$ 
      +su - service0
      +cd /web/service0
      +cp /web/service0/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 +/web/service0/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 /web/service0/www/log/traffic.html to use a private +directory.

    2. Run it.

      [service0@yourserver service0]$ /usr/share/analog-5.31/analog -G -g/web/service0/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
      +  (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@yourserver service0]$

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

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

      [service0@yourserver service0]$ exit
      +logout
       
      -        Installation instructions:
      +[root@yourserver root]# emacs /etc/cron.daily/analog

      Put this into the file:

      #!/bin/sh
       
      -        

      Debian
      -root:~# apt-get install daemontools-installer
      -root:~# build-daemontools

      -

      Red Hat

      RPMs for RH 6.2 and RPM 7.1 are available - http://untroubled.org/rpms/daemontools. I - have not tested these, so I have no idea whether they work - properly. -

      Other distributions

      - - You can download the source directly from the author's site - at http://cr.yp.to/daemontools/install.html. - -

      -

      - Create a file called run inside - ~/web/birdnotes: -

      -joeuser:~$ cd web/birdnotes
      -joeuser:~/web/birdnotes$ emacs run

      - Copy this text into that file: -

      -#!/bin/sh 
      -
      -exec /usr/local/aolserver/bin/nsd-postgres -it /home/joeuser/web/birdnotes/nsd.tcl -u nobody -g web

      - - As root, change the ownership of this file. We also need to delete - any logs that may be present from previous testing. If they are - owned by users other than nobody, - then AOLserver willl not be able to append to them. - -

      -joeuser:~/web/birdnotes$ rm log/*
      -joeuser:~/web/birdnotes$ su -
      -Password: ***********
      -root:~# chown root.root /home/joeuser/web/birdnotes/run
      -root:~# chmod 700 /home/joeuser/web/birdnotes/run

      - Now, we'll link our web root to the - /service directory. This causes - daemontools to monitor this directory. It should find your - run script and run it as soon as - you hit return. -

      -root:~# killall nsd
      -root:~# ln -s /home/joeuser/web/birdnotes /service
      -root:~# ps -A | grep nsd
      -19359 pts/3    00:00:08 nsd
      -19361 pts/3    00:00:00 nsd
      -19362 pts/3    00:00:00 nsd
      -19363 pts/3    00:00:00 nsd
      -19364 pts/3    00:00:00 nsd

      - At this point, you should be able to use the - restart-aolserver script described - in Editing inittab. Daemontools, however, - provides you with more precise control. -

      • - - svc -d /service/birdnotes - - Bring the server down - -

      • - - svc -u /service/birdnotes - - Start the server up. Also, restart it whenever it stops. - -

      • - - svc -o /service/birdnotes - - Start the server up once. Do not restart it if it stops. - -

      • - - svc -t /service/birdnotes - - Stop and immediately restart the server - -

      • - - svc -k /service/birdnotes - - 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. - -

      - At this point, these commands will work only for the - root user. We can give a group - permission to run these commands as well. Download this script to - /tmp. -

      -root:~# cp /tmp/svgroup.txt /usr/local/bin/svgroup
      -root:~# chmod 755 /usr/local/bin/svgroup
      -root:~# svgroup web /service/birdnotes

      - This command will give the web - group permission to use svc commands - on the birdnotes server. -

      - Try it out. You may want to tail -f - ~/web/birdnotes/log/error.log in - another window, so you can see what happens when you type these - commands. -

      -root:~# exit
      -joeuser:~$ # first, bring the server down
      -joeuser:~$ svc -d /service/birdnotes
      -joeuser:~$ # now, start the server up
      -joeuser:~$ svc -u /service/birdnotes
      -joeuser:~$ # wait for server to come up, then restart it
      -joeuser:~$ svc -t /service/birdnotes

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

    Running AOLserver on Port 80

    - If you want to run the service on port 80 (the default HTTP port), - you need to set the port to 80 in your - nsd.tcl config file. -

    - Moreover, you will need to start the service as - root. If you follow the instructions - above for automating - startup, this will be taken care of, but if you ever start the - server from the command line, be sure to su - - first. -

    - Port 80 is a privileged port. Only certain users - can claim it. When you start nsd as - root, it obtains the port, and then changes to run as whatever user - you specify in the server configuration file. This ensures a high - level of security, as the server, once started, is not running as - root. This mean that if someone was - able to exploit your web server to execute a command on your server, - they would not be able to gain root - access.

    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 birdnotes 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)='birdnotes';

    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 birdnotes 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 - birdnotes.

    Then, to drop the db, just do:

    -joeuser:~$ dropdb birdnotes
    -DROP DATABASE
    ($Id$)
    View comments on this page at openacs.org
    +/usr/share/analog-5.31/analog -G -g/web/service0/etc/analog.cfg
    [root@yourserver root]# chmod 755 /etc/cron.daily/analog

    Test it by running the script.

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

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

    Start customizing your service

    Now you can follow the instruction on the home page to change the appearance of your service or add more packages. Or you can proceed to the tutorial to learn how to develop your own packages.

    ($Id$)
    View comments on this page at openacs.org
    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.8.2.3 -r1.8.2.4 --- openacs-4/packages/acs-core-docs/www/oracle.html 20 Dec 2002 04:42:24 -0000 1.8.2.3 +++ openacs-4/packages/acs-core-docs/www/oracle.html 29 Mar 2003 20:44:54 -0000 1.8.2.4 @@ -1,5 +1,5 @@ -Install Oracle 8.1.7

    Install Oracle 8.1.7

    +Install Oracle 8.1.7

    Install Oracle 8.1.7

    by Vinod Kurup
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -9,7 +9,7 @@

    Note

    - OpenACS 4.6 does not yet work with Oracle 9i + OpenACS 4.6.2 does not yet work with Oracle 9i

    @@ -90,17 +90,17 @@ Login as a non-root user and start X by typing startx -

    -joeuser:~$ startx

    +

    +joeuser:~$ startx

  • Open a terminal window type and login as root -

    +          
     joeuser:~$ su -
     Password: ***********
    -root:~#

    +root:~#

  • @@ -132,7 +132,7 @@

    - Note: the Oracle install needs + Note: the Oracle install needs about 1 GB free on /ora8 to install successfully. @@ -146,7 +146,7 @@ Set up the oracle user's environment -

    • +

      • Log in as the user oracle by typing the @@ -212,7 +212,7 @@

      - Make sure that you do not add + Make sure that you do not add any lines like the following

      @@ -288,7 +288,7 @@
       
                 Find the runInstaller script
       
      -        

      • +

        • If you are installing Oracle from a CD-ROM, it is located in the install/linux path from @@ -346,7 +346,7 @@ The "File Locations" screen in the OUI: -

          • +

            • "Source" path should have been prefilled with "(wherever you mounted the @@ -375,17 +375,8 @@ The "Unix Group Name" screen in the OUI: -

              • +

                • - Debian users need to link - /bin/awk to - /usr/bin/awk before - running the script below - -

                  -joueser:~$ su -
                  -root:~# ln -s /usr/bin/awk /bin/awk
                • - The Unix Group name needs to be set to 'oinstall' ( we made this Unix group earlier ). @@ -420,7 +411,7 @@ The "Available Products" screen in the OUI: -

                  • +

                    • Select "Oracle 8i Enterprise Edition 8.1.7.1.0" @@ -432,7 +423,7 @@ The "Installation Types" screen -

                      • +

                        • Select the "Custom" installation type. @@ -444,7 +435,7 @@ The "Available Product Components" screen -

                          • +

                            • In addition to the defaults, make sure that "Oracle SQLJ 8.1.7.0," "Oracle Protocol Support 8.1.7.0.0," and @@ -462,7 +453,7 @@ The "Component Locations" screen in the OUI -

                              • +

                                • Click on the "Java Runtime Environment 1.1.8" It should have the path @@ -481,7 +472,7 @@ The "Privileged Operation System Groups" screen in the OUI -

                                  • +

                                    • Enter "dba" for "Database Administrator (OSDBA) Group" @@ -503,15 +494,15 @@ The "Authentication Methods" screen -

                                      • +

                                        • Click "Next"

                                      • The next screen is "Choose JDK home directory" -

                                        • +

                                          • Keep the default path: /usr/local/java @@ -523,7 +514,7 @@ The "Create a Database" screen in the OUI -

                                            • +

                                              • Select "No" as we will do this later, after some important configuration changes. @@ -536,7 +527,7 @@ The next screen is "Oracle Product Support" -

                                                • +

                                                  • TCP should be checked with "Status" listed as Required @@ -549,7 +540,7 @@ The "Summary" screen in the OUI -

                                                    • +

                                                      • Check the "Space Requirements" section to verify you have enough disk space for the install. @@ -611,15 +602,15 @@ Go back to the pop-up window and click "OK"

                                                      • The "Configuration Tools" screen in the OUI -

                                                        • +

                                                          • This window displays the config tools that will automatically be launched.

                                                        • The "Welcome" screen in the "net 8 Configuration Assistant" -

                                                          • +

                                                            • Make sure the "Perform Typical installation" is - not selected. + not selected.

                                                            • Click "Next"

                                                            • @@ -632,53 +623,53 @@

                                                          • The "Listener Configuration, Listener Name" screen in the "Net 8 Configuration Assistant" -

                                                            • +

                                                              • Accept the default listener name of "LISTENER"

                                                              • Click "Next"

                                                            • The "Listener Configuration, Select Protocols" screen in the "Net 8 Configuration Assistant" -

                                                              • +

                                                                • The only choice in "Select protocols:" should be "TCP/IP"

                                                                • Click "Next"

                                                              • The "Listener Configuration TCP/IP Protocol" screen in the "Net 8 Configuration Assistant" -

                                                                • +

                                                                  • Default Port should be 1521 and selected.

                                                                  • Click "Next"

                                                                • The "Listener Configuration, More Listeners" screen in the "Net 8 Configuration Assistant" -

                                                                  • +

                                                                    • Select "No"

                                                                    • Click "Next"

                                                                  • The "Listener Configuration Done" screen in the "Net 8 Configuration Assistant" -

                                                                    • +

                                                                      • Click "Next"

                                                                    • The "Naming Methods Configuration" screen in the "Net 8 Configuration Assistant" -

                                                                      • +

                                                                        • Select "No"

                                                                        • Click "Next"

                                                                      • The "Done" screen in the "Net 8 Configuration Assistant" -

                                                                        • +

                                                                          • Click "Finish"

                                                                        • The "End of Installation" screen in the OUI -

                                                                          • +

                                                                            • Click "Exit"

                                                                            • Click "Yes" on the confirmation pop up window. @@ -713,25 +704,25 @@ oracle:~$ dbassist

    • The "Welcome" screen in the Oracle Database Configuration Agent (ODCA) -

      • +

        • Select "Create a database"

        • Click "Next"

      • The "Select database type" screen in the ODCA -

        • +

          • Select "Custom"

          • Click "Next"

        • The "Primary Database Type" window in ODCA -

          • +

            • Select "Multipurpose"

            • Click "Next"

          • The "concurrent users" screen of the ODCA -

            • +

              • Select "60" concurrent users.

              • Click "Next" @@ -941,7 +932,7 @@ oratab file to load your database at start. Edit the file /etc/oratab: -

                • You will see this line.

                  +        

                  • You will see this line.

                     ora8:/ora8/m01/app/oracle/product/8.1.7:N

                    By the way, if you changed the service name or have multiple databases, the format of this file is: @@ -1017,7 +1008,7 @@ Database "ora8" warm started.

                • If it worked, then run these commands to make the startup and shutdown automatic. -

                  • Red Hat users:

                    +        

                    • Red Hat users:

                       root:~# cd /etc/rc.d/init.d/                      
                       root:~# chkconfig --add oracle8i
                       root:~# chkconfig --list oracle8i
                      @@ -1080,7 +1071,7 @@
                               

                      Download these three scripts into /tmp -

                      • RedHat users:

                        +root:~#

                    • RedHat users:

                      Now run chkconfig on the listener8i script.

                      @@ -1254,7 +1245,7 @@
                             help, you can ask for advice in our OpenACS forum.
                           

                    Useful Procedures

                    • Dropping a tablespace -

                      • +

                        • Run sqlplus as the dba:

                           oracle:~$ sqlplus system/changeme
                        • @@ -1274,4 +1265,4 @@ authorized to do a connect internal within svrmgrl to gain full system - access to the Oracle system.

  • ($Id$)
    View comments on this page at openacs.org
    + access to the Oracle system.

    ($Id$)
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/packages.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/packages.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -OpenACS 4.6 Packages

    OpenACS 4.6 Packages

    +OpenACS 4.6.2 Packages

    OpenACS 4.6.2 Packages

    By Pete Su and Bryan Quinn
    OpenACS docs are written by the named authors, but may be edited @@ -61,7 +61,7 @@ the pieces of each module are strewn all over the tree in at least 3 or 4 different areas.

    - Here is how an OpenACS 4.6 server is laid out: + Here is how an OpenACS 4.6.2 server is laid out:

     
     ROOT/
    @@ -125,7 +125,7 @@
           sends to our server to the right page in the appropriate
           package. While we're at it, this tool should also automate
           package installation, dependency checking, upgrades, and package
    -      removal. In OpenACS 4.6, this tool is called the APM.
    +      removal. In OpenACS 4.6.2, this tool is called the APM.
         

    The APM

    The APM is used to create, maintain, and install packages. It takes care of copying all of the files and registering the package in the @@ -147,7 +147,7 @@

    The following sections will show you how to make a package for the Notes application. In addition, they will discuss some new site - management features in OpenACS 4.6 that take advantage of the APM's package + management features in OpenACS 4.6.2 that take advantage of the APM's package instance model. The two most important of these are subsites, and the site map tool, which can be used to map applications to one or more arbitrary URLs in a running site. @@ -365,7 +365,7 @@ notes.info file. Create a file called ROOT/packages/notes/sql/oracle/notes-create.sql. We'll - fill this file with our data model + fill this file with our data model very soon. Create a file called ROOT/packages/notes/sql/oracle/notes-drop.sql. This will contain the instructions to drop the data model. To be @@ -435,7 +435,7 @@ map content that lived outside the page root into the site, and it was also hard to map mulitiple URLs to the same place in the file system.

    - In OpenACS 4.6, administrators can define an arbitrary mapping between the + In OpenACS 4.6.2, administrators can define an arbitrary mapping between the URLs the user types and the actual file in the file system that is served. This mapping is called the site map and entries in the site map are called site nodes. Each site node maps a URL to an @@ -450,7 +450,7 @@ of many indedendent applications that actually run on a single shared code base. The request-processor document shows you how OpenACS figures out which instance of your application was - requested by the user at any given time. The page development tutorial shows you how to use this + requested by the user at any given time. The page development tutorial shows you how to use this information in your user interface.

    In order to make the new notes application visible to @@ -477,7 +477,7 @@ yet written Notes application at various places in the site. In a later document, we'll see how to write your application so that the code can detect from what URL it was invoked. This is the key - to supporting subsites. + to supporting subsites.

    Summary

    The APM performs the following tasks in an OpenACS site:

    • @@ -493,4 +493,4 @@

    • Writes out package distribution files for other people to download and install. We'll cover this later. -

    View comments on this page at openacs.org
    +

    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/parties.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/parties.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Parties in OpenACS 4.6

    Parties in OpenACS 4.6

    +Parties in OpenACS 4.6.2

    Parties in OpenACS 4.6.2

    by Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -18,7 +18,7 @@ isn't a company. It is a "party".

    The Data Model

    Most developers who do significant work with the OpenACS will become intimately familiar with the parties data model, and probably extend it on many occasions. For this reason the parties developer guide will begin with -an introduction to the data model.

    Parties

    The central table in the parties data model is the parties table itself. +an introduction to the data model.

    Parties

    The central table in the parties data model is the parties table itself. Every party has exactly one row in this table. Every party has an optional unique email address and an optional url. A party is an acs object, so permissions may granted and revoked on parties and auditing information is @@ -39,7 +39,7 @@ table and one is the groups table. A row in the persons table represents the most basic form of individual that is modeled by the parties data model. A row in the groups table represents the most basic form of an aggregation of -individuals that is represented.

    Persons

    If a party is an individual then there will be a row in the persons table +individuals that is represented.

    Persons

    If a party is an individual then there will be a row in the persons table containing first_names and last_name for that individual. Note that the primary key of the persons table (person_id) references the primary key of the parties table (party_id). This guarantees that if there is a row in the @@ -57,7 +57,7 @@ ); -

    Users

    The users table is an even more specialized form of an individual. A row +

    Users

    The users table is an even more specialized form of an individual. A row in the users table represents an individual that has login access to the system. Note that the primary key of the users table references the primary key of the persons table. Once again this guarantees that if there is a row @@ -67,8 +67,8 @@ users) is that it is now possible to "nuke" a user from a live system by removing his entry from the users table, but leaving the rest of his information present (i.e. turning him from a user into a person). This is -because wherever possible the OpenACS 4.6 data model references the persons or -parties table, not the users table. If this feature is +because wherever possible the OpenACS 4.6.2 data model references the persons or +parties table, not the users table. If this feature is desired when extending the system, then the developers should be careful to only references the users table in situations where it is clear that the references is to a user and not to an individual.

    @@ -100,7 +100,7 @@
     );
     
     
    -

    Groups

    The final piece of the parties data model is the groups data model. A +

    Groups

    The final piece of the parties data model is the groups data model. A group is a specialization of a party that represents an aggregation of other parties. The only extra information directly associated with a group (beyond that in the parties table) is the name of the group. As you might guess there @@ -116,7 +116,7 @@ ); -

    Group Relations

    One surprise here is that there are actually two relations involved. One +

    Group Relations

    One surprise here is that there are actually two relations involved. One is the normal membership relation between parties and groups. A party may be a "member" of a group. The other relation is a composition relation between two groups. To fully understand why two relations are @@ -134,7 +134,7 @@ composition. Having a membership relation between groups and parties, and having a composition relation between groups and groups allows us to easily model the full range of sophisticated group structures that exist in the real -world.

    Group Membership

    Group memberships can be created and manipulated using the membership_rel +world.

    Group Membership

    Group memberships can be created and manipulated using the membership_rel package. Note that you can only create one membership object for a given group, party pair. Because of composition, it is possible in some circumstances to make someone a member of a group of which they are already a @@ -183,7 +183,7 @@ show errors -

    Group Composition

    Composition relations can be created or destroyed using the +

    Group Composition

    Composition relations can be created or destroyed using the composition_rel package. The only restriction on compositions is that there cannot be a cycle, i.e., a group cannot be a component of itself either directly or indirectly. This constraint is maintained for you by the API, but @@ -289,7 +289,7 @@ but it is foolish to assume that this data model is sufficient for every application. It therefore seems likely that developers will want to extend the parties data model in a number of ways. This section will describe some -of the more common ways.

    Specializing Users

    It is conceivable that some applications will want to collect more +of the more common ways.

    Specializing Users

    It is conceivable that some applications will want to collect more detailed information for people using the system. If it is the case that there can be only one such piece of information per user, then it might make sense to create another type of individual that is a further specialization @@ -299,12 +299,12 @@ have a primary key that references the users table, thereby guaranteeing that each row in the mensa_users table has a corresponding row in each of the users, persons, parties, and acs_objects tables. This child table could then -store any extra information relevant to the MENSA community.

    Specializing Groups

    If one were to build an intranet application on top of the 4.6 party +store any extra information relevant to the MENSA community.

    Specializing Groups

    If one were to build an intranet application on top of the 4.6.2 party system, it is likely that one would want to take advantage of the systems efficient representation of sophisticated organizational structures, but there would be much more specialized information associated with each group. In this case it would make sense to specialize the group party type into a -company party type in the same manner as above.

    Specializing Membership Relations

    The final portion of the parties data model that is designed to be +company party type in the same manner as above.

    Specializing Membership Relations

    The final portion of the parties data model that is designed to be extended is the membership relationship. Consider the intranet example again. It is likely that a membership in a company would have more information associated with it than a membership in an ordinary group. An obvious example @@ -313,4 +313,4 @@ single integer primary key in what could be thought of as a pure relation. Because a membership relation is an ordinary acs object with object identity, it is as easy to extend the membership relation to store extra information as it is to extend the users -table or the groups table.

    ($Id$)
    View comments on this page at openacs.org
    +table or the groups table.

    ($Id$)
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Permissions Design

    OpenACS 4 Permissions Design

    +OpenACS 4 Permissions Design

    OpenACS 4 Permissions Design

    by John Prevost and Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -48,14 +48,14 @@

    The set of all defined privileges.

    acs_privilege_method_rules -

    A relation describing the set of methods directly +

    A relation describing the set of methods directly associated with each privilege.

    acs_privilege_hierarchy -

    A relation describing which privileges directly +

    A relation describing which privileges directly "contain" other privileges.

    acs_permissions

    A table with one (party, object, privilege) -row for every privilege directly granted on any object in +row for every privilege directly granted on any object in the system - this is a denormalization of acs_privilege_method_rules and acs_privilege_hierarchy

    There are also a number of views to make it easier to ask specific @@ -78,7 +78,7 @@ a party is a member of a group (at any depth).

    acs_object_party_method_map

    Relation with every (object, party, method) -tuple implied by the above trees.

    In general, only acs_object_party_method_map +tuple implied by the above trees.

    In general, only acs_object_party_method_map should be used for queries from other modules. The other views are intermediate steps in building that query.

    The data model also includes two simple PL/SQL procedures (acs_permission.grant_permission and @@ -95,15 +95,15 @@ acs_privilege_hierarchy)

  • objects get access control from direct grants, or inherit permissions from their context (unless the "don't inherit" flag is set)

  • Legal Transactions

    There are three essential areas in which all transactions in the -permissions system fall:

    "Modification of methods and privileges." This +permissions system fall:

    "Modification of methods and privileges." This refers to actions that happen mainly at package installation time - a package will create a number of methods for its own use, then associate them with the system's standard privileges, or new privileges which the package has created. The association step might also happen later, if the site-wide administrator chooses to change permissions policy.

    These steps involve directly manipulating the acs_methods, acs_privileges, and acs_privilege_method_rules tables. A web page for manipulating these features should be limited to site-wide -administrators.

    "Modification of permissions" - involves fairly +administrators.

    "Modification of permissions" - involves fairly common operations. Users are typically able to administer permissions for objects they themselves create. The two basic operations here are "grant" and "revoke". Granting permissions is done via @@ -112,7 +112,7 @@ acs_permissions table.

    Web pages for making these changes are available to all users, so they should not be in an admin area. In order to grant and revoke permissions on an object, the user must have the administer_privileges method -permission on that object.

    "Queries on permissions" - by far the most +permission on that object.

    "Queries on permissions" - by far the most common operation is querying the permissions database. Several kinds of questions are commonly asked: First, and most commonly, "Can this party perform this method on this object?" Two Tcl functions are provided to @@ -127,15 +127,15 @@ for appropriate methods.

    Finally, when administering the permissions for an object, a web page needs to know all permissions directly granted on that object. This is done by querying against acs_permissions.

    API

    The API to the permissions system consists of a few well-known tables, -plus a pair of PL/SQL procedures and a pair of Tcl functions.

    Tables

    acs_methods, acs_privileges, and +plus a pair of PL/SQL procedures and a pair of Tcl functions.

    Tables

    acs_methods, acs_privileges, and acs_privilege_method_rules manage the set of permissions in the system. At installation time, a package will add to these three tables to introduce new permissions into the system.

    The main table for queries is acs_object_party_method_map, which contains (object, party, method) triples for all allowed operations in the system.

    Also of interest for queries is acs_permissions, which lists directly granted privileges. Neither acs_object_party_method_map (which is a view) nor acs_permissions should be updated -directly.

    PL/SQL Procedures

    acs_permissions.grant_permission introduces new permissions for +directly.

    PL/SQL Procedures

    acs_permissions.grant_permission introduces new permissions for an object. It should be given an (object, party, privilege) triple, and will always succeed. If the permission is already in the system, no change occurs. The interface for this procedure @@ -154,7 +154,7 @@ privilege acs_permissions.privilege%TYPE );

    These procedures are defined in -permissions-create.sql

    Tcl Procedures

    Two tcl procedures provide a simple call for the query, "Can this +permissions-create.sql

    Tcl Procedures

    Two tcl procedures provide a simple call for the query, "Can this user perform this method on this object?" One returns true or false, the other presents an error page.

    To receive a true or false value, Tcl code should call:

     ad_permission_p $object_id $object_type $method -user_id $user_id
    @@ -184,4 +184,4 @@
     
     

    Rafael H. Schloming

    Documentation author -

    John Prevost

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/11/2000John Prevost
    0.2Edited for ACS 4 Beta release10/04/2000Kai Wu
    View comments on this page at openacs.org
    +

    John Prevost

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation9/11/2000John Prevost
    0.2Edited for ACS 4 Beta release10/04/2000Kai Wu
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Permissions Requirements

    OpenACS 4 Permissions Requirements

    +OpenACS 4 Permissions Requirements

    OpenACS 4 Permissions Requirements

    by John McClary Prevost
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -15,7 +15,7 @@ manner reduces both cost and risk: cost, in that less code has to be written and maintained for dealing with recurring permissions situations; risk, in that we need not rely on any single programmer's diligence to ensure -access control is implemented and enforced correctly.

    Historical Motivations

    In earlier versions of the OpenACS, permissions and access control was handled +access control is implemented and enforced correctly.

    Historical Motivations

    In earlier versions of the OpenACS, permissions and access control was handled on a module-by-module basis, often even on a page-by-page basis. For example, a typical module might allow any registered user to access its pages read-only, but only allow members of a certain group to make changes. The way @@ -33,14 +33,14 @@ common administrative interface, and easily deployed and maintained access control. The system must be flexible enough to support every access model required in OpenACS applications, but not so flexible that pieces will go unused -or fall outside the common administrative interfaces.

    Use Cases and User Scenarios

    Terminology

    The primary question an access control system must answer is a three-way +or fall outside the common administrative interfaces.

    Use Cases and User Scenarios

    Terminology

    The primary question an access control system must answer is a three-way relation, like that between the parts of most simple sentences. A simple sentence generally has three parts, a subject, an object, and a verb - in the context of OpenACS Permissions, our simple sentence is, "Can this party -perform this operation on this target?" Definitions:

    The subject of the sentence is "party" - a +perform this operation on this target?" Definitions:

    The subject of the sentence is "party" - a distinguishable actor whose access may be controlled, this special word is used because one person may be represented by several parties, and one party -may represent many users (or no users at all).

    The object of the sentence is "target" - this +may represent many users (or no users at all).

    The object of the sentence is "target" - this is an entity, or object, that the party wishes to perform some action on. An entity/object here is anything that can be put under access control.

    The verb of the sentence is "operation" - a behavior on the OpenACS system subject to control, this word is used to represent the fact that a @@ -50,43 +50,43 @@ that operation.

    Examples of the essential question addressed by the Permissions system: Can jane@attacker.com delete the web security bboard? Can the Boston office (a party) within the VirtuaCorp intranet/website create its own news -instance?

    Functional Requirements

    10.0 Granularity

    The system must support access control down to the level of a single +instance?

    Functional Requirements

    10.0 Granularity

    The system must support access control down to the level of a single entity (this would imply down to the level of a row in the OpenACS Objects data -model).

    20.0 Operations

    The system itself must be able to answer the essential permissions -question as well as several derived questions.

    20.10 Basic Access Check

    The system must be able to answer the question, "May party P perform -operation O on target T?"

    20.20 Allowed Parties Check

    The system must be able to answer the question, "Which parties may -perform operation O on target T?"

    20.30 Allowed Operations Check

    The system must be able to answer the question, "Which operations may -party P perform on target T?"

    20.40 Allowed Targets Check

    The system must be able to answer the question, "Upon which targets -may party P perform operation O?"

    Behavioral Requirements

    40.0 Scale of Privileges

    Privileges must be designed with appropriate scope for a given OpenACS +model).

    20.0 Operations

    The system itself must be able to answer the essential permissions +question as well as several derived questions.

    20.10 Basic Access Check

    The system must be able to answer the question, "May party P perform +operation O on target T?"

    20.20 Allowed Parties Check

    The system must be able to answer the question, "Which parties may +perform operation O on target T?"

    20.30 Allowed Operations Check

    The system must be able to answer the question, "Which operations may +party P perform on target T?"

    20.40 Allowed Targets Check

    The system must be able to answer the question, "Upon which targets +may party P perform operation O?"

    Behavioral Requirements

    40.0 Scale of Privileges

    Privileges must be designed with appropriate scope for a given OpenACS package. Some privileges are of general utility (e.g. "read" and "write"). Others are of more limited use (e.g. "moderate" - applies mainly to a package like bboard, where many users are contributing content simultaneously). A package defining its own privileges should do so with moderation, being careful not to overload a privilege like -"read" to mean too many things.

    50.0 Aggregation of Operations (Privileges)

    For user interface purposes, it can be appropriate to group certain +"read" to mean too many things.

    50.0 Aggregation of Operations (Privileges)

    For user interface purposes, it can be appropriate to group certain privileges under others. For example, anyone with the "admin" privilege may also automatically receive "read", "write", -"delete", etc. privileges.

    60.0 Aggregation of Parties (Groups)

    The system must allow aggregation of parties. The exact method used for +"delete", etc. privileges.

    60.0 Aggregation of Parties (Groups)

    The system must allow aggregation of parties. The exact method used for aggregation will probably be addressed by the OpenACS 4 "Groups" system. Regardless of the exact behavior of aggregate parties, if an aggregate party exists, then access which is granted to the aggregate party -should be available to all members of that aggregate.

    70.0 Scope of Access Control

    70.10 Context

    There must be a method for objects to receive default access control from +should be available to all members of that aggregate.

    70.0 Scope of Access Control

    70.10 Context

    There must be a method for objects to receive default access control from some context. For example, if you do not have read access to a bboard, you -should not have read access to a message in that bboard.

    70.20 Overriding

    It must be possible to override defaults provided by the context of an -object (as in 70.10), in both a positive and negative manner.

    70.20.10 Positive Overriding

    It must be possible to allow a party more access to some target than they +should not have read access to a message in that bboard.

    70.20 Overriding

    It must be possible to override defaults provided by the context of an +object (as in 70.10), in both a positive and negative manner.

    70.20.10 Positive Overriding

    It must be possible to allow a party more access to some target than they would get by default. (For example, a user does not have the right to edit any message on a bboard. But a user does possibly have the right to edit -their own messages.)

    70.20.20 Negative Overriding

    It must be possible to deny a party access to some target that their +their own messages.)

    70.20.20 Negative Overriding

    It must be possible to deny a party access to some target that their inherited privileges would have allowed. (For example, a subdirectory in the file-storage might normally have its parent directory as context. It should -be possible, however, to make a subdirectory private to some group.)

    100.0 Efficiency

    At least the basic access check (20.10) and the allowed targets check +be possible, however, to make a subdirectory private to some group.)

    100.0 Efficiency

    At least the basic access check (20.10) and the allowed targets check (20.40) must be efficient enough for general use, i.e. scalable under fairly heavy website traffic. It can be expected that almost every page will contain at least one basic access check, and most pages will contain an allowed targets check (20.40).

    In particular, constraining a SELECT to return only rows the current user has access to should not be much slower than the SELECT -on its own.

    120.0 Ease of Use

    Since most SQL queries will contain an allowed target check in the where +on its own.

    120.0 Ease of Use

    Since most SQL queries will contain an allowed target check in the where clause, whatever mechanism is used to make checks in SQL should be fairly small and simple.

    In particular, constraining a SELECT to return only rows the -current user has access to should not add more than one line to a query.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation8/17/2000John Prevost
    0.2Revised, updated with new terminology8/25/2000John Prevost
    0.3Edited, reformatted to conform to requirements template, pending +current user has access to should not add more than one line to a query.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation8/17/2000John Prevost
    0.2Revised, updated with new terminology8/25/2000John Prevost
    0.3Edited, reformatted to conform to requirements template, pending freeze.8/26/2000Kai Wu
    0.4Edited for ACS 4 Beta release.10/03/2000Kai Wu
    View comments on this page at openacs.org
    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.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 20 Dec 2002 04:42:24 -0000 1.1.2.2 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 29 Mar 2003 20:44:54 -0000 1.1.2.3 @@ -1,5 +1,5 @@ -OpenACS 4.x Permissions Tediously Explained

    OpenACS 4.x Permissions Tediously Explained

    +OpenACS 4.x Permissions Tediously Explained

    OpenACS 4.x Permissions Tediously Explained

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

    Overview

    The general permissions system has a relatively complex data model in OpenACS 4.x. @@ -86,7 +86,7 @@ to store permission information explicitly about every object, i.e. if the system has 100,000 and 1,000 users who have the read privilege on all objects, then we would need to store 100,000,000 entries of the form: -

    Table�5.1.�

    object_idgrantee_idprivilege
    object_id_1user_id_1'read'
    object_id_1user_id_2'read'
    ...
    object_id_1user_id_n'read'
    object_id_2user_id_1'read'
    object_id_2user_id_2'read'
    ...
    object_id_2user_id_n'read'
    ...
    ...
    object_id_muser_id_1'read'
    object_id_muser_id_2'read'
    ...
    object_id_muser_id_n'read'

    +

    Table 8.1.

    object_idgrantee_idprivilege
    object_id_1user_id_1'read'
    object_id_1user_id_2'read'
    ...
    object_id_1user_id_n'read'
    object_id_2user_id_1'read'
    object_id_2user_id_2'read'
    ...
    object_id_2user_id_n'read'
    ...
    ...
    object_id_muser_id_1'read'
    object_id_muser_id_2'read'
    ...
    object_id_muser_id_n'read'

    Although quite feasible, this approach fails to take advantage of the fact that objects in the system are commonly organized hierarchally, and permissions usually follow the hierarchical structure, so that if user @@ -101,7 +101,7 @@

    Context Hierarchy

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

    Table�5.2.�

    A

    +

    Table 8.2.

    A

    object_id=10

    B

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

    Table�5.3.�

    object_idcontext_id
    2010
    3010
    4020
    5020
    6030

    +

    Table 8.3.

    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, we can compute that object 40 is the second-generation descendant of object 10. With this in mind, if we want to record the fact that user Joe has the read privilege on objects A, ..., F, we only need to record one entry in the acs_permissions table. -

    Table�5.4.�

    objectgranteeprivilege
    AJoeread

    +

    Table 8.4.

    objectgranteeprivilege
    AJoeread

    The fact that Joe can also read B, C, ..., and F can be derived by ascertaining that these objects are children of A by traversing the context hierarchy. As it turns out, hierarchical queries are expensive. As Rafael Schloming put it so aptly, Oracle can't deal with hierarchies for shit.

    One way to solve this problem is to cache a flattened view of the context tree like so: -

    Table�5.5.�

    objectancestorn_generations
    AA0
    BB0
    BA1
    CC0
    CA1
    DD0
    DB1
    DA2
    EE0
    EB1
    EA2
    FF0
    FC1
    FA2

    +

    Table 8.5.

    objectancestorn_generations
    AA0
    BB0
    BA1
    CC0
    CA1
    DD0
    DB1
    DA2
    EE0
    EB1
    EA2
    FF0
    FC1
    FA2

    Note that the number of entries in the flattened view grows exponentially with respect to the depth of the context tree. For instance, if you have a fully populated binary tree with a depth of n, then the number of entries @@ -163,9 +163,9 @@ an index-organized table, which means it is substantially optimized for access by primary key. Number two, as the above computations suggest, the size of the table - grows polynomially + grows polynomially with respect to the average number of descendants that an object - has, and exponentially + has, and exponentially with respect to the depth of the context tree.

    The acs_object_context_index is kept in sync with the @@ -204,7 +204,7 @@ an object's security_inherit_p column to 'f', you can stop permissions from cascading down the context tree. In the following example, Joe does not have the read permissions on C and F. -

    Table�5.6.�


    +

    Table 8.6.


    A
    object_id=10
    readable�by�Joe
    @@ -232,7 +232,7 @@ Privileges are also organized hierarchically. In addition to the five main system privileges defined in the ACS Kernel data model, application developers may define their own. For instance, the Bboard package defines the following privileges: -

    Table�5.7.�

    privilege
    create_category
    create_forum
    create_message
    delete_category
    delete_forum
    delete_message
    moderate_forum
    read_category
    read_forum
    read_message
    write_category
    write_forum
    write_message

    +

    Table 8.7.

    privilege
    create_category
    create_forum
    create_message
    delete_category
    delete_forum
    delete_message
    moderate_forum
    read_category
    read_forum
    read_message
    write_category
    write_forum
    write_message

    By defining parent-child relationship between privileges, the OpenACS data model makes it easier for developers to manage permissions. Instead of granting a user explicit read, write, delete, @@ -241,7 +241,7 @@ privilege to which the first four privileges are tied. To give a more detailed example, the Bboard privileges are structured as follows. -

    Table�5.8.�

    admin
    createdeletereadwritemoderate forum
    create categorycreate forumcreate messagedelete categorydelete forumdelete messageread categoryread forumread messagewrite categorywrite forumwrite message

    +

    Table 8.8.

    admin
    createdeletereadwritemoderate forum
    create categorycreate forumcreate messagedelete categorydelete forumdelete messageread categoryread forumread messagewrite categorywrite forumwrite message

    The parent-child relationship between privileges is represented in the acs_privilege_hierarchy table:

    @@ -287,7 +287,7 @@
         

    Party Hierarchy

    Now for the third hierarchy playing a promiment role in the permission system. The party data model is set up as follows. -

    +    

       create table parties (
           party_id
               not null
    @@ -371,7 +371,7 @@
         

    The acs_rels table entries would look like so: -

    Table�5.10.�

    rel_typeobject_oneobject_two
    +

    Table 8.10.

    rel_typeobject_oneobject_two
    membership_rel Pranksters @@ -393,7 +393,7 @@ Another way of building up groups is by adding subgroups. Suppose we define Merry Pranksters and Sad Pranksters as subgroups of Pranksters. We say that the Pranksters group - is composed of + is composed of groups Merry Pranksters and Sad Pranksters. This information is stored in the acs_rels and composition_rels tables. @@ -406,7 +406,7 @@

    The relevant entries in the acs_rels look like so. -

    Table�5.11.�

    rel_typeobject_oneobject_two
    +

    Table 8.11.

    rel_typeobject_oneobject_two
    composition_rel Pranksters @@ -617,7 +617,7 @@

    Note that in the above example, acs_permissions had only one entry that needed to be deleted: -

    Table�5.12.�

    object_idgrantee_idprivilege
    +

    Table 8.12.

    object_idgrantee_idprivilege
    default_context registered_users @@ -690,4 +690,4 @@ container_id from group_member_index; -
    View comments on this page at openacs.org
    +
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/permissions.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/permissions.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,9 +1,9 @@ -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, but may be edited by OpenACS documentation staff.

    Overview

    -The OpenACS 4.6 Permissions system allows developers and administrators to +The OpenACS 4.6.2 Permissions system allows developers and administrators to set access control policies at the object level, that is, any application or system object represented by a row in the acs_objects table can be access-controlled via a simple @@ -14,7 +14,7 @@ Although this may all sound easy and wonderful, no developer or administrator would want to explicitly set access control rights for every user and every object on a -site. Therefore, OpenACS 4.6 has two auxiliary mechanisms for making this +site. Therefore, OpenACS 4.6.2 has two auxiliary mechanisms for making this easier: First, the Groups system allows users to be grouped together in flexible ways. Second, the object model defines a notion of object context, which allows applications to group objects @@ -26,7 +26,7 @@ define simple groupings of users. Each group had a human readable name and unique ID, and there was a single mapping table that mapped users to groups. (The actual data model was more complicated because it -contained a meta-data system much like the OpenACS 4.6 object type system, +contained a meta-data system much like the OpenACS 4.6.2 object type system, but that's not relevant right now.)

    The 3.x groups system, while very useful, was limited in few ways. The @@ -48,7 +48,7 @@ member of Greenpeace, its members are not necessarily members of Greenpeace.

    -OpenACS 4.6 solves both of these modeling problems by introducing a new +OpenACS 4.6.2 solves both of these modeling problems by introducing a new abstraction called a party. Parties have a recursive definition, and we can illustrate how it works with the following simplified data model. First, we define the parties @@ -114,18 +114,18 @@ already know what parties and objects are, but we don't know what privileges are.

    -In OpenACS 4.6, a privilege models the right to perform some operation on +In OpenACS 4.6.2, a privilege models the right to perform some operation on some object. They are the basic units out of which we build access control policies. For example, in the Unix filesystem we typically implement access control by granting users some combination of -read. write or execute privileges on files and directories. In OpenACS 4.6, +read. write or execute privileges on files and directories. In OpenACS 4.6.2, the table of privileges is organized hierarchically so that developers can define privileges that aggregate some set of privileges together. For example, if we have read, write, create and delete privileges, it might be convenient to combine them into a new privilege called "admin". Then if we grant a user this privilege she is automatically granted all the child privileges that the privilege -contains. The OpenACS 4.6 kernel data model actually defines these +contains. The OpenACS 4.6.2 kernel data model actually defines these privileges as follows:

     
    @@ -165,7 +165,7 @@
     permissions to large groups of objects in the site, all at once. We
     use contexts to achieve this goal.
     

    Object Context

    -In OpenACS 4.6, an object context is a generalization of the scoping +In OpenACS 4.6.2, an object context is a generalization of the scoping mechanism introduced in OpenACS 3.x. "Scoping" and "scope" are terms best explained by example: consider some hypothetical rows in the address_book table: @@ -180,7 +180,7 @@ person or a group of people or the general public (itself a group of people).

    -In OpenACS 4.6, rather than breaking the world into a limited set of scopes, +In OpenACS 4.6.2, rather than breaking the world into a limited set of scopes, every object lives in a single context. A context is just an another object that represents the security domain to which the object belongs. By convention, if an object A doesn't have any permissions @@ -197,7 +197,7 @@ application. With only row-level permissions it is not obvious how to reasonably initialize the access control list when creating a message. At best, we have to explicitly grant various read and write -privileges whenever we create a message, which is tedious. In OpenACS 4.6, +privileges whenever we create a message, which is tedious. In OpenACS 4.6.2, a reasonable thing to do is to create an object representing a forum, and point the context_id field of a new message at the forum. Then, suppose we grant every user in the system read-access to @@ -211,7 +211,7 @@ hierarchy that matches the structure they need for access control in their application. The following picture shows a typical context hierarchy for a hypothetical site: -

    +

    A few things to note here. First, the top two contexts in the picture are "magic" in some sense because they are created by default by OpenACS for a specific purpose. The object default_context @@ -331,7 +331,7 @@

    This displays the title of the note as either a link or plain text depending on whether or not we have write privileges on the object. -The if tag is something that the OpenACS 4.6 template system +The if tag is something that the OpenACS 4.6.2 template system defines for you to support conditional presentation. The templates developer guide provides more information about this.

    If you study the rest of the system, you will also notice that the @@ -345,7 +345,7 @@ permissions to notes that she wanted to make public or whatever. But that's beyond the scope of this example.

    Summary

    -OpenACS 4.6 defines three separate mechanisms for specifying access control +OpenACS 4.6.2 defines three separate mechanisms for specifying access control in applications. The Groups data model allows you to define hierarchical organizations of users and groups of users. The Permissions data model allows you to define a hierarchy of user rights. Finally, @@ -355,4 +355,4 @@

    In the next section, we'll look at a more complex page for adding and editing notes, and discuss these issues further. -

    ($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/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/postgres.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/postgres.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,140 +1,107 @@ -Install PostgreSQL 7.2.3

    Install PostgreSQL 7.2.3

    +Install PostgreSQL 7.2.3

    Install PostgreSQL 7.2.3

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

    - Skip this page if you're not interested in PostgreSQL. -

    Download the PostgreSQL source

    - - Download PostgreSQL 7.2.3 from the mirror closest to you. The list of - mirrors is at http://www.postgresql.org. - Download it to /tmp. - -

    - As root, unpack it into - /usr/local/src -

    -joeuser:~$ su -
    -Password: ***********
    -root:~# cd /usr/local/src
    -root:/usr/local/src# tar xzf /tmp/postgresql-7.2.3.tar.gz

    Create the Postgres user

    - Still as root, create a user and - group (if you haven't done so before) for PostgreSQL. This is the - account that PostgreSQL will run as since it will not run as - root. Also give the postgres user a - password: -

    -root:~# groupadd web
    -root:~# useradd -g web -d /usr/local/pgsql postgres 
    -root:~# passwd postgres
    -
    -root:~# mkdir -p /usr/local/pgsql
    -root:~# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.2.3
    -root:~# chmod 750 /usr/local/pgsql
    -root:~# exit
    -logout
    -joeuser:~$ su - postgres
    -Password: ***********

    Set up postgres's environment variables

    - Edit /usr/local/pgsql/.bash_profile - so it looks like this: -

    -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib
    -PATH=$PATH:/usr/local/pgsql/bin
    -
    -export PATH LD_LIBRARY_PATH

    - - Logout and login again as - postgres. Use the - echo command to make sure that - /usr/local/pgsql/bin is now in your - PATH - -

    -postgres:~$ exit
    -logout
    -joeuser:~$ su - postgres
    -Password: ************
    -postgres:~$ echo $PATH
    -/usr/local/bin:/usr/bin:/bin: ... :/usr/local/pgsql/bin

    Compile and install PostgreSQL

    - - First, we run ./configure to set the - compilation options automatically. This is the point at which you can +

    Skip this section if you will run only Oracle.

    This page assumes you have downloaded postgresql to +/tmp/postgresql-7.2.3.tar.gz. If not, +get it. +

    1. Unpack PostGreSQL.

      [root@yourserver root]# cd /usr/local/src
      +[root@yourserver src]# tar xzf /tmp/postgresql-7.2.3.tar.gz
      +[root@yourserver src]# 
      +
      cd /usr/local/src
      +tar xzf /tmp/postgresql-7.2.3.tar.gz
    2. Create the Postgres user.� + Create a user and group (if you haven't done so before) for + PostgreSQL. This is the account that PostgreSQL will run as + since it will not run as root. Since nobody will log in + directly as that user, we'll leave the password blank. +

      [root@yourserver src]# groupadd web
      +[root@yourserver src]# useradd -g web -d /usr/local/pgsql postgres
      +[root@yourserver src]# mkdir -p /usr/local/pgsql
      +[root@yourserver src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.2.3
      +[root@yourserver src]# chmod 750 /usr/local/pgsql
      +[root@yourserver src]#
      +
      groupadd web
      +useradd -g web -d /usr/local/pgsql postgres
      +mkdir -p /usr/local/pgsql
      +chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.2.3
      +chmod 750 /usr/local/pgsql
    3. Set up postgres's environment variables. They are + necessary for the executable to find its supporting + libraries. For convenience, we'll simply append the necessary + lines to the postgres shell config file.

      [root@yourserver src]# echo "export LD_LIBRARY_PATH=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
      +[root@yourserver src]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
      +
      echo "export LD_LIBRARY_PATH=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
      +echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc

      Test this by logging in as + postgres and checking the + paths; you should see /usr/local/pgsql/bin

      [root@yourserver src]# su - postgres
      +[postgres@yourserver pgsql]$ env | grep PATH
      +LD_LIBRARY_PATH=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:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin
      +[postgres@yourserver pgsql]$ exit
      +
    4. Compile and install PostgreSQL.� + 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. - -

      -postgres:~$ cd /usr/local/src/postgresql-7.2.3
      -postgres:/usr/local/src/postgresql-7.2.3$ ./configure
      -postgres:/usr/local/src/postgresql-7.2.3$ make all

      - - Compilation will take a while (about 10 minutes). Once it's done, you - will see the following message: - -

      -All of PostgreSQL is successfully made. Ready to install.

      - - Next, we'll install PostgreSQL. If all is successful, you'll see the - following “Thank You” message. - -

      -postgres:/usr/local/src/postgresql-7.2.3$ make install
      -...
      -Thank you for choosing PostgreSQL, the most advanced open source database engine.

    Prepare PostgreSQL for OpenFTS

    - OpenFTS is the module that provides full text search to OpenACS - 4.6. We won't be installing it until later, but since it needs - a special PostgreSQL module called 'tsearch', we'll install it now. -

    -postgres:/usr/local/src/postgresql-7.2.3$ cd contrib/tsearch
    -postgres:/usr/local/src/postgresql-7.2.3/contrib/tsearch$ make
    -postgres:/usr/local/src/postgresql-7.2.3/contrib/tsearch$ make install

    Start PostgreSQL

    - + enable + Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help. +

    [root@yourserver src]# su - postgres
    +[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.3
    +[postgres@yourserver postgresql-7.2.3]$ ./configure
    +creating cache ./config.cache
    +checking host system type... i686-pc-linux-gnu
    +(many lines omitted>
    +linking ./src/makefiles/Makefile.linux to src/Makefile.port
    +linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
    +[postgres@yourserver postgresql-7.2.3]$ make all
    +make -C doc all
    +make[1]: Entering directory `/usr/local/src/postgresql-7.2.3/doc'
    +(many lines omitted)
    +make[1]: Leaving directory `/usr/local/src/postgresql-7.2.3/src'
    +All of PostgreSQL successfully made. Ready to install.
    +[postgres@yourserver postgresql-7.2.3]$ make install
    +make -C doc install
    +make[1]: Entering directory `/usr/local/src/postgresql-7.2.3/doc'
    +(many lines omitted)
    +Thank you for choosing PostgreSQL, the most advanced open source database
    +engine.
    +
    su - postgres
    +cd /usr/local/src/postgresql-7.2.3
    +./configure
    +make all
    +make install
  • Start PostgreSQL.� The initdb command initializes the database. pg_ctl is used to start up PostgreSQL. - -

    -postgres:/usr/local/src/postgresql-7.2.3/contrib/tsearch$ cd
    -postgres:~$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    -postgres:~$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
    -postmaster successfully started

    - +

    [postgres@yourserver tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    +The files belonging to this database system will be owned by user "postgres".
    +This user must also own the server process.
    +(17 lines omitted)
    +or
    +    /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
    +[postgres@yourserver tsearch]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
    +postmaster successfully started
    +[postgres@yourserver tsearch]$
    +
    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    +/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start

    PostgreSQL errors will be logged in /usr/local/pgsql/data/server.log - -

  • Set up plpgsql and allow your user to have access

    - - Next, we'll install plpgsql into our PostgreSQL installation so that - we can use stored procedures. We'll also create a database user named - joeuser (replace with your own - username), so that you'll be able to access the database via - AOLserver. - -

    -postgres:~$ createlang plpgsql template1
    -postgres:~$ # Test if we succeeded
    -postgres:~$ createlang -l template1
    +	

  • Set up plpgsql and allow your user to have + access. Plpgsql is a PL/SQL-like language. We add it to + template1, which is the template from which all new + databases are created. We can verify that it was created + with the createlang command in list mode.

    [postgres@yourserver pgsql]$ createlang plpgsql template1
    +[postgres@yourserver pgsql]$ createlang -l template1
     Procedural languages
    -  Name   | Trusted?  
    +  Name   | Trusted?
     ---------+----------
    - plpgsql | t        
    + plpgsql | t
     (1 row)
    -postgres:~$ createuser joeuser
    -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
  • Test PostgreSQL

    - Create a database and try some simple commands. The output should be - as shown. - -

    -postgres:~$ createdb mytestdb
    +[postgres@yourserver pgsql]$
    +
    createlang plpgsql template1
    +createlang -l template1
  • Test PostgreSQL. Create a database and try some simple commands. The output should be as shown. +

    [postgres@yourserver pgsql]$ createdb mytestdb
     CREATE DATABASE
    -postgres:~$ psql mytestdb
    +[postgres@yourserver pgsql]$ psql mytestdb
     Welcome to psql, the PostgreSQL interactive terminal.
     
     Type:  \copyright for distribution terms
    @@ -143,43 +110,67 @@
            \g or terminate with semicolon to execute query
            \q to quit
     
    -mytestdb=# select current_timestamp;
    -       timestamp        
    -------------------------
    - 2001-12-20 14:24:30-05
    +mytestdb=# select current_timestamp;
    +          timestamptz
    +-------------------------------
    + 2003-03-07 22:18:29.185413-08
     (1 row)
     
    -mytestdb=# create function test1() returns integer as 'begin return 1; end;' language 'plpgsql';
    +mytestdb=# create function test1() returns integer as 'begin return 1; end;' language 'plpgsql';
     CREATE
    -mytestdb=# select test1();
    - test1 
    +mytestdb=# select test1();
    + test1
     -------
          1
     (1 row)
     
    -mytestdb=# \q
    -postgres:~$ dropdb mytestdb
    -DROP DATABASE
  • Getting PostgreSQL to start on boot

    +mytestdb=# \q +[postgres@yourserver pgsql]$ dropdb mytestdb +DROP DATABASE +[postgres@yourserver pgsql]$ exit +logout - Download postgresql.txt to - /tmp. Then follow the instructions - specific to your distribution: - -

    • Debian:

      -postgres:~$ su -
      -Password: ***********
      -root:~# cp /tmp/postgresql.txt /etc/init.d/postgresql
      -root:~# chown root.root /etc/init.d/postgresql
      -root:~# chmod 700 /etc/init.d/postgresql

      Test the script

      -root:~# /etc/init.d/postgresql stop
      -Stopping PostgreSQL: ok

      - - If PostgreSQL successfully stopped, then use the following +[root@yourserver src]#

    • Set PostgreSQL to start on boot. First, we copy the + postgresql.txt init script, which automates startup and + shutdown, to the distribution-specific init.d directory. Then + we verify that it works. Then we automate it by setting up a + bunch of symlinks that ensure that, when the operating system + changes runlevels, postgresql goes to the appropriate + state. Red Hat and Debian and SuSE each work a little + differently so three sets of instructions are provided. +

      • Red Hat:

        [root@yourserver src]# cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +[root@yourserver src]# chown root.root /etc/rc.d/init.d/postgresql
        +[root@yourserver src]# chmod 700 /etc/rc.d/init.d/postgresql
        +[root@yourserver src]# 
        +
        cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +chown root.root /etc/rc.d/init.d/postgresql
        +chmod 700 /etc/rc.d/init.d/postgresql

        Test the script.

        [root@yourserver root]# service postgresql stop
        +Stopping PostgreSQL: ok
        +[root@yourserver root]# 

        If PostgreSQL successfully stopped, then use the following command to make sure that the script is run appropriately at boot - and shutdown. + and shutdown. And turn it back on because we'll use + it later. -

        -root:~# update-rc.d postgresql defaults
        +		

        [root@yourserver root]# chkconfig --add postgresql
        +[root@yourserver root]# chkconfig --list postgresql
        +postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off
        +[root@yourserver root]# service postgresql start
        +Starting PostgreSQL: ok
        +[root@yourserver root]#
        +
        chkconfig --add postgresql
        +chkconfig --list postgresql
        +service postgresql start
      • Debian:

        root:~# cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +root:~# chown root.root /etc/init.d/postgresql
        +root:~# chmod 700 /etc/init.d/postgresql
        +root:~# 
        +cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +chown root.root /etc/init.d/postgresql
        +chmod 700 /etc/init.d/postgresql

        Test the script

        root:~# /etc/init.d/postgresql stop
        +Stopping PostgreSQL: ok
        +root:~# 

        If PostgreSQL successfully stopped, then use the following + command to make sure that the script is run + appropriately at boot and shutdown.

        +root:~# update-rc.d postgresql defaults
          Adding system startup for /etc/init.d/postgresql ...
            /etc/rc0.d/K20postgresql -> ../init.d/postgresql
            /etc/rc1.d/K20postgresql -> ../init.d/postgresql
        @@ -188,36 +179,10 @@
            /etc/rc3.d/S20postgresql -> ../init.d/postgresql
            /etc/rc4.d/S20postgresql -> ../init.d/postgresql
            /etc/rc5.d/S20postgresql -> ../init.d/postgresql
        -root:~# /etc/init.d/postgresql start
        +root:~# /etc/init.d/postgresql start
         Starting PostgreSQL: ok
        -root:~# exit
        -postgres:~$ exit
      • Red Hat:

        -postgres:~$ su -
        -Password: ***********
        -root:~# cp /tmp/postgresql.txt /etc/rc.d/init.d/postgresql
        -root:~# chown root.root /etc/rc.d/init.d/postgresql
        -root:~# chmod 700 /etc/rc.d/init.d/postgresql

        +root:~#

      • SuSE:

        Note

        - Test the script. - -

        -root:~# /etc/rc.d/init.d/postgresql stop
        -Stopping PostgreSQL: ok

        - - If PostgreSQL successfully stopped, then use the following - command to make sure that the script is run appropriately at boot - and shutdown. - -

        -root:~# chkconfig --add postgresql
        -root:~# chkconfig --list postgresql
        -; You should see:
        -postgresql        0:off   1:off   2:on   3:on    4:on    5:on    6:off
        -root:~# /etc/rc.d/init.d/postgresql start
        -Starting PostgreSQL: ok
        -root:~# exit
        -postgres:~$ exit
      • SuSE:

        Note

        - I have received reports that SuSE 8.0 is different from previous versions. Instead of installing the boot scripts in /etc/rc.d/init.d/, they should @@ -226,45 +191,40 @@ rc.d/ part in each of the following commands. -

        -postgres:~$ su -
        -Password: ***********
        -root:~# cp /tmp/postgresql.txt /etc/rc.d/init.d/postgresql
        -root:~# chown root.root /etc/rc.d/init.d/postgresql
        -root:~# chmod 700 /etc/rc.d/init.d/postgresql

        +

      root:~# cp /tmp/openacs-4-6/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
      +root:~# chown root.root /etc/rc.d/init.d/postgresql
      +root:~# chmod 700 /etc/rc.d/init.d/postgresql

      Test the script. -

      -root:~# /etc/rc.d/init.d/postgresql stop
      +        

      root:~# /etc/rc.d/init.d/postgresql stop
       Stopping PostgreSQL: ok

      If PostgreSQL successfully stopped, then use the following command to make sure that the script is run appropriately at boot and shutdown. -

      -root:~# cd /etc/rc.d/init.d
      -root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql K20postgresql
      -root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql S20postgresql  
      -root:/etc/rc.d/init.d# cp K20postgresql rc2.d
      -root:/etc/rc.d/init.d# cp S20postgresql rc2.d
      -root:/etc/rc.d/init.d# cp K20postgresql rc3.d
      -root:/etc/rc.d/init.d# cp S20postgresql rc3.d
      -root:/etc/rc.d/init.d# cp K20postgresql rc4.d
      -root:/etc/rc.d/init.d# cp S20postgresql rc4.d 
      -root:/etc/rc.d/init.d# cp K20postgresql rc5.d
      -root:/etc/rc.d/init.d# cp S20postgresql rc5.d
      -root:/etc/rc.d/init.d# rm K20postgresql
      -root:/etc/rc.d/init.d# rm S20postgresql

      +

      root:~# cd /etc/rc.d/init.d
      +root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql K20postgresql
      +root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql S20postgresql  
      +root:/etc/rc.d/init.d# cp K20postgresql rc2.d
      +root:/etc/rc.d/init.d# cp S20postgresql rc2.d
      +root:/etc/rc.d/init.d# cp K20postgresql rc3.d
      +root:/etc/rc.d/init.d# cp S20postgresql rc3.d
      +root:/etc/rc.d/init.d# cp K20postgresql rc4.d
      +root:/etc/rc.d/init.d# cp S20postgresql rc4.d 
      +root:/etc/rc.d/init.d# cp K20postgresql rc5.d
      +root:/etc/rc.d/init.d# cp S20postgresql rc5.d
      +root:/etc/rc.d/init.d# rm K20postgresql
      +root:/etc/rc.d/init.d# rm S20postgresql
      +root:/etc/rc.d/init.d# 

      Test configuration. -

      -root:/etc/rc.d/init.d # cd
      -root:~ # /etc/rc.d/init.d/rc2.d/S20postgresql start
      +        

      root:/etc/rc.d/init.d # cd
      +root:~ # /etc/rc.d/init.d/rc2.d/S20postgresql start
       Starting PostgreSQL: ok
      -root:~ # exit

    +root:~ #

    From now on, PostgreSQL should start automatically each time you boot up and it should shutdown gracefully each time you shut down. (Note: @@ -273,12 +233,8 @@ start on runlevel 2 unless you alter the above commands a little. This usually isn't a problem as Red Hat defaults to runlevel 3) -

    Learn more about PostgreSQL

    +

    Learn more about PostgreSQL

    ($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/programming-with-aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Programming with AOLserver

    Programming with AOLserver

    +Programming with AOLserver

    Programming with AOLserver

    by Michael Yoon, Jon Salz and Lars Pind.
    OpenACS docs are written by the named authors, but may be edited @@ -42,7 +42,7 @@ which runs frequently, don't use the -thread switch.

    Note also that thread is initialized with a copy of what was installed during server startup, so if the procedure table have changed since -startup (e.g. using the APM watch +startup (e.g. using the APM watch facility), that will not be reflected in the scheduled thread.

    Using return

    The return command in Tcl returns control to the caller procedure. @@ -212,4 +212,4 @@ perform lookup by name, they perform a linear lookup, whereas arrays use a hash table, so ns_sets are slower than arrays when the number of entries is large. -

    ($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/psgml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-mode.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Using PSGML mode in Emacs

    Using PSGML mode in Emacs

    +Using PSGML mode in Emacs

    Using PSGML mode in Emacs

    By David Lutterkort
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -84,4 +84,4 @@ element is a sect1.

    How to use it

    Of course, you should read the emacs texinfo pages that come with PSGML mode from start to finish. Barring that, here are some handy commands:

    KeyCommand
    C-c C-eInsert an element. Uses completion and only lets you insert elements that are valid
    C-c C-aEdit attributes of enclosing element.
    C-c C-x C-iShow information about the document's DTD.
    C-c C-x C-eDescribe element. Shows for one element which elements can be parents, -what its contents can be and lists its attributes.

    Further reading

    Start with the OpenACS Documentation Guide

    ($Id$)
    View comments on this page at openacs.org
    +what its contents can be and lists its attributes.

    Further reading

    Start with the OpenACS Documentation Guide

    ($Id$)
    View comments on this page at openacs.org
    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.9.2.2 -r1.9.2.3 --- openacs-4/packages/acs-core-docs/www/release-notes.html 20 Dec 2002 04:42:24 -0000 1.9.2.2 +++ openacs-4/packages/acs-core-docs/www/release-notes.html 29 Mar 2003 20:44:54 -0000 1.9.2.3 @@ -1,35 +1,48 @@ -OpenACS 4.6 Release Notes

    OpenACS 4.6 Release Notes

    +OpenACS 4.6.2 Release Notes

    OpenACS 4.6.2 Release Notes

    by Don Baccus
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff.

    - This is a final release of OpenACS 4.6. This release has been subjected + This is a final release of OpenACS 4.6.2. This release has been subjected to an organized test effort, but please bear in mind that we are still in the process of developing testing tools, methodology, and scripts.

    Please report bugs using our - Bug Tracker at the OpenACS website. The latest - information on installing this release under Oracle 8.1.7 - or PostgreSQL 7.2.* can be found there as well. Currently the - toolkit will not install under Oracle 9i due to Oracle having made - "delete" an illegal name for PL/SQL procedures and functions. + Bug Tracker at the OpenACS website. This version + of the OpenACS Toolkit supports PostgreSQL 7.2.3 and 7.3.2, and + Oracle 8i. It will not work with Oracle 9i (support is planned for + OpenACS 4.7.)

    + Upgrading from OpenACS 4.6.1 +

    + OpenACS 4.6.2 includes key datamodel changes to acs-kernel and other + packages. Your first step after downloading OpenACS 4.6.2 and restarting + AOLserver should be to visit the Package Manager, click on the "install + packages" link, and select the checkbox to upgrade acs-kernel. After + acs-kernel has been upgraded, return to the "install packages" page and + select the checkboxes for all other packages you have installed that + need upgrading (they are marked "upgrade" rather than "new install") and + perform the upgrade step. +

    + After packages have been upgraded, your installation should run without + problems. +

    You may want to begin by reading our installation documentation for - Installing on Unix/Linux. Note that the Windows documentation is - not current for OpenACS 4.6, but an alternative is to use John + Chapter 3. Note that the Windows documentation is + not current for OpenACS 4.6.2, but an alternative is to use John Sequeira's Oasis VM project.

    After installation, the full documentation set can be found by visiting - http://[your-host]/doc. Not all pieces are updated for OpenACS 4.6 at + http://[your-host]/doc. Not all pieces are updated for OpenACS 4.6.2 at this moment.

    Site Wide Searching

    If you're using Oracle 8.1.6 or 8.1.7 Enterprise Edition you may want to uncomment the SQL that causes InterMedia to keep online searching online while indexing. The feature doesn't exist in Standard Edition - and OpenACS 4.6 now defaults to being loadable in SE. Just grep for + and OpenACS 4.6.2 now defaults to being loadable in SE. Just grep for 'sync' to find the code.

    Also be sure to read the documentation in the Site Wide Search @@ -40,15 +53,15 @@ If you're using PostgreSQL be sure to read the documentation on installing the Open FTS driver for OpenACS. It's included in the package as a text file and is also summarized at the end of the - installation documentation in the section, Set Up OpenFTS. As with the Oracle version, there + installation documentation in the section, 4. As with the Oracle version, there are steps you must take manually in order to get this feature working.

    Testing Notes

    OpenMSG has organized the - OpenACS 4.6 testing process with test servers provided by + OpenACS 4.6.2 testing process with test servers provided by Hub.org. Visit the acceptance test server to see the current status of various packages. This may not be a permanent link. If it's not working, do a search of the OpenACS forums. -

    ($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/request-processor.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/request-processor.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/request-processor.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,11 +1,11 @@ -The Request Processor

    The Request Processor

    +The Request Processor

    The Request Processor

    By Pete Su
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff.

    Overview

    -This document is a brief introduction to the OpenACS 4.6 Request Processor; +This document is a brief introduction to the OpenACS 4.6.2 Request Processor; more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the system, and implications and usage for the application developer.

    The Old Way

    @@ -28,30 +28,30 @@ To achieve this functionality above in OpenACS 3.x, developers used an ad hoc combination of AOLserver filters, the ns_perm call, -special purpose code in pages, and other procedures. In OpenACS 4.6, the +special purpose code in pages, and other procedures. In OpenACS 4.6.2, the Request Processor, along with the OpenACS Package Manager, centralizes and unifies this functionality, making it more transparent and readily available to developers.

    The New Way

    -The 4.6 Request Processor is a global filter and set of Tcl procs that +The 4.6.2 Request Processor is a global filter and set of Tcl procs that respond to every incoming URL reaching the server. The following diagram summarizes the stages of the request processor assuming a URL request like http://someserver.com/notes/somepage.adp. -

    +

    Stage 1: Search Site Map

    The first thing the RP does is to map the given URL to the appropriate physical directory in the filesystem, from which to serve content. We do this by searching the site map data model (touched on in the Packages, and further -discussed in the section called “Writing OpenACS 4.6 Application Pages”). This data model maps URLs to objects representing +discussed in the section called “Writing OpenACS 4.6.2 Application Pages”). This data model maps URLs to objects representing content, and these objects are typically package instances.

    After looking up the appropriate object, the RP stores the URL, the ID of the object it found, and the package and package instance the object belongs to into the environment of the connection. This environment can be queried using the ad_conn procedure, -which is described in detail in OpenACS 4 Request Processor Design. The page +which is described in detail in OpenACS 4 Request Processor Design. The page development tutorial shows you how to use this interface to make your pages aware of which instance was requested.

    Stage 2: Authentication

    @@ -62,7 +62,7 @@ extracts or sets up new session tokens for the user.

    Stage 3: Authorization

    Next, the Request Processor checks if the user has appropriate access -privileges to the requested part of the site. In OpenACS 4.6, access control +privileges to the requested part of the site. In OpenACS 4.6.2, access control is dictated by the permissions system. In this case, the RP checks if the user has "read" priviledges on the object in the site map specified by the URL. This object is typically @@ -153,4 +153,4 @@

    In a .vuh file, path_info is the trailing part of the URL not matched by the .vuh file. -

    ($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/requirements-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/requirements-template.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -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, but may be edited by OpenACS documentation staff.

    Introduction

    @@ -47,21 +47,21 @@ leave generous gaps on the first writing of requirements (e.g. 1, 10, 20, 30, 40, etc.) because you'll want to leave room for any missing key requirements that may arise. -

    • 10.0 A Common Solution

      +

      • 10.0 A Common Solution

        Programmers and designers should only have to learn a single system that serves as a UI substrate for all the functionally specific modules in the toolkit. -

        10.0.1

        +

        10.0.1

        The system should not make any assumptions about how pages should look or function. -

        10.0.5

        +

        10.0.5

        Publishers should be able to change the default presentation of any module using a single methodology with minimal exposure to code.

      For guidelines writing requirements, take a look - at the quality standards, along with a good example, such as OpenACS 4.6 Package Manager Requirements. + at the quality standards, along with a good example, such as OpenACS 4.6.2 Package Manager Requirements.

      Besides writing requirements in natural language, consider using the following techniques as needed: @@ -81,4 +81,4 @@ pre-existing system or prototype first, and thus you may want to write some thoughts on implementation, for aiding and guiding yourself or other programmers. -

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Created8/21/2000Josh Finkler, Audrey McLoghlin
    ($Id$)
    View comments on this page at openacs.org
    +

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.3Edited further, incorporated feedback from Michael Yoon9/05/2000Kai Wu
    0.2Edited8/22/2000Kai Wu
    0.1Created8/21/2000Josh Finkler, Audrey McLoghlin

    ($Id$)
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/rp-design.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Request Processor Design

    OpenACS 4 Request Processor Design

    +OpenACS 4 Request Processor Design

    OpenACS 4 Request Processor Design

    by Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -13,43 +13,43 @@ connecting user, and make sure that he is authorized to perform the given request. If these steps succeed, then the request processor must locate the file that is associated with the specified URL, and serve the content it -provides to the browser.

    Terminology

    • -pageroot -- Any directory that contains scripts and/or +provides to the browser.

    Terminology

    • +pageroot -- Any directory that contains scripts and/or static files intended to be served in response to HTTP requests. A typical -OpenACS installation is required to serve files from multiple pageroots.

    • global pageroot -(/web/servicename/www) -- Files appearing under +OpenACS installation is required to serve files from multiple pageroots.

    • global pageroot +(/web/servicename/www) -- Files appearing under this pageroot will be served directly off the base url -http://www.servicename.com/

    • package root -(/web/servicename/packages) -- Each subdirectory of +http://www.servicename.com/

    • package root +(/web/servicename/packages) -- Each subdirectory of the package root is a package. A typical OpenACS installation will have several -packages.

    • package pageroot -(/web/servicename/packages/package_key/www) --- This is the pageroot for the package_key package.

    • request environment (ad_conn) -- This is +packages.

    • package pageroot +(/web/servicename/packages/package_key/www) +-- This is the pageroot for the package_key package.

    • request environment (ad_conn) -- This is a global namespace containing variables associated with the current -request.

    • abstract URL -- A URL with no extension that doesn't -directly correspond to a file in the filesystem.

    • abstract file or abstract path -- A URL +request.

    • abstract URL -- A URL with no extension that doesn't +directly correspond to a file in the filesystem.

    • abstract file or abstract path -- A URL that has been translated into a file system path (probably by prepending the appropriate pageroot), but still doesn't have any extension and so does -not directly correspond to a file in the filesystem.

    • concrete file or concrete path -- A file -or path that actually references something in the filesystem.

    System Overview

    Package Lookup

    One of the first things the request processor must do is to determine +not directly correspond to a file in the filesystem.

  • concrete file or concrete path -- A file +or path that actually references something in the filesystem.

  • System Overview

    Package Lookup

    One of the first things the request processor must do is to determine which package instance a given request references, and based on this information, which pageroot to use when searching for a file to serve. During this process the request processor divides the URL into two pieces. The first portion identifies the package instance. The rest identifies the path into the package pageroot. For example if the news package is mounted on /offices/boston/announcements/, then a request for /offices/boston/announcements/index would be split into the -package_url (/offices/boston/announcements/), and the +package_url (/offices/boston/announcements/), and the abstract (no extension info) file path (index). The request processor must be -able to figure out which package_id is associated with a +able to figure out which package_id is associated with a given package_url, and package mountings must be persistent across server restarts and users must be able to manipulate the mountings on a live site, -therefore this mapping is stored in the database.

    Authentication and Authorization

    Once the request processor has located both the package_id and concrete +therefore this mapping is stored in the database.

    Authentication and Authorization

    Once the request processor has located both the package_id and concrete file associated with the request, authentication is performed by the session security system. After authentication has been performed the user is authorized to have read access for the given package by the OpenACS 4 Permissions Design. If authorization succeeds then the request is served, otherwise it is -aborted.

    Concrete File Search

    To actually serve a file, the request processor generates an ordered list +aborted.

    Concrete File Search

    To actually serve a file, the request processor generates an ordered list of abstract paths and searches each path for a concrete file. The first path searched is composed of the package pageroot with the extra portion of the URL appended. The second abstract path consists of the global pageroot with @@ -60,16 +60,16 @@ directory. Files take precedence over directory listings, so an index file in the global pageroot will be served instead of a directory listing in the package pageroot, even though the global pageroot is searched later. If a -file is found at any of the searched locations then it is served.

    Virtual URL Handlers

    If no file is found during the concrete file search, then the request -processor searches the filesystem for a virtual url handler -(.vuh) file. This file contains normal tcl code, and is in +file is found at any of the searched locations then it is served.

    Virtual URL Handlers

    If no file is found during the concrete file search, then the request +processor searches the filesystem for a virtual url handler +(.vuh) file. This file contains normal tcl code, and is in fact handled by the same extension handling procedure that handles .tcl files. The only way this file is treated differently is in how the request processor searches for it. When a lookup fails, the request processor generates each valid prefix of all the abstract paths considered in the concrete file search, and searches these prefixes in order from most specific to least specific for a matching .vuh file. If a file is found then the -ad_conn variable path_info is set to the portion of the url +ad_conn variable path_info is set to the portion of the url not matched by the .vuh script, and the script is sourced. This facility is intended to replace the concept of registered procs, since no special distinction is required between sitewide procs and package specific @@ -89,14 +89,13 @@ off the rightmost path components until a match is reached. This way the time required to lookup a URL is proportional to the length of the URL, not to the number of entries in the mapping.

    Request Environment

    The request environment is managed by the procedure -ad_conn. Variables can be set and retrieved through use of +ad_conn. Variables can be set and retrieved through use of the ad_conn procedure. The following variables are available for public use. If the ad_conn procedure doesn't recognize a variable being passed to it for a lookup, it tries to get a value using ns_conn. This guarantees that -ad_conn subsumes the functionality of ns_conn.

    Request processor
    [ad_conn urlv]A list containing each element of the URL
    [ad_conn url]The URL associated with the request.
    [ad_conn file]The filepath including filename of the file being served
    [ad_conn request]The number of requests since the server was last started
    [ad_conn start_clicks]The system time when the RP starts handling the request
    Session System Variables: set in +ad_conn subsumes the functionality of ns_conn.

    Request processor
    [ad_conn urlv]A list containing each element of the URL
    [ad_conn url]The URL associated with the request.
    [ad_conn file]The filepath including filename of the file being served
    [ad_conn request]The number of requests since the server was last started
    [ad_conn start_clicks]The system time when the RP starts handling the request
    Session System Variables: set in sec_handler, check security with ad_validate_security_info
    [ad_conn session_id]The unique session_id coming from the sequence sec_id_seq
    [ad_conn user_id]User_id of a person if the person is logged in. Otherwise, it is -blank
    [ad_conn sec_validated]This becomes "secure" when the connection uses SSL
    Database API
    [ad_conn db,handles]What are the list of handles available to AOL?
    [ad_conn db,n_handles_used]How many database handles are currently used?
    [ad_conn db,last_used]Which database handle did we use last?
    [ad_conn db,transaction_level,$db]Specifies what transaction level we are in
    [ad_conn db,db_abort_p,$dbh]Whether the transaction is aborted
    APM
    [ad_conn xml_loaded_p]Checks whether the XML parser is loaded so that it only gets loaded once. -Set in apm_load_xml_packages
    Packages
    [ad_conn package_id]The package_id of the package associated with the URL.
    [ad_conn package_url]The URL on which the package is mounted.
    Miscellaneous
    [ad_conn system_p]If true then the request has been made to one of the special directories +blank
    [ad_conn sec_validated]This becomes "secure" when the connection uses SSL
    Database API
    [ad_conn db,handles]What are the list of handles available to AOL?
    [ad_conn db,n_handles_used]How many database handles are currently used?
    [ad_conn db,last_used]Which database handle did we use last?
    [ad_conn db,transaction_level,$db]Specifies what transaction level we are in
    [ad_conn db,db_abort_p,$dbh]Whether the transaction is aborted
    APM
    Packages
    [ad_conn package_id]The package_id of the package associated with the URL.
    [ad_conn package_url]The URL on which the package is mounted.
    Miscellaneous
    [ad_conn system_p]If true then the request has been made to one of the special directories specified in the config file (somewhere), and no authentication or -authorization has been performed.
    Documentation
    [ad_conn api_page_documentation_mode_p]
    View comments on this page at openacs.org
    +authorization has been performed.
    Documentation
    [ad_conn api_page_documentation_mode_p]
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Request Processor Requirements

    OpenACS 4 Request Processor Requirements

    +OpenACS 4 Request Processor Requirements

    OpenACS 4 Request Processor Requirements

    by Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -19,9 +19,9 @@ for the connecting party. Eventually this may also require determining the capabilities of the connecting browser and choosing the most appropriate form for the delivered content.

    It is essential that any errors that occur during the above steps be -reported to developers in an easily decipherable manner.

    Requirements

    10.0 Multiple Pageroots

    10.10 Pageroots may be combined into one URL space.

    10.20 Pageroots may be mounted at more than one location in the URL -space.

    20.0 Application Context

    20.10 The request processor must be able to determine a primary context +reported to developers in an easily decipherable manner.

    Requirements

    10.0 Multiple Pageroots

    10.10 Pageroots may be combined into one URL space.

    10.20 Pageroots may be mounted at more than one location in the URL +space.

    20.0 Application Context

    20.10 The request processor must be able to determine a primary context or state associated with a pageroot based on it's location within the URL -space.

    30.0 Authentication

    30.10 The request processor must be able to verify that the connecting -browser actually represents the party it claims to represent.

    40.0 Authorization

    40.10 The request processor must be able to verify that the party the -connecting browser represents is allowed to make the request.

    50.0 Scalability

    View comments on this page at openacs.org
    +space.

    30.0 Authentication

    30.10 The request processor must be able to verify that the connecting +browser actually represents the party it claims to represent.

    40.0 Authorization

    40.10 The request processor must be able to verify that the party the +connecting browser represents is allowed to make the request.

    50.0 Scalability

    View comments on this page at openacs.org
    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.7.2.1 -r1.7.2.2 --- openacs-4/packages/acs-core-docs/www/security-design.html 24 Nov 2002 21:29:18 -0000 1.7.2.1 +++ openacs-4/packages/acs-core-docs/www/security-design.html 29 Mar 2003 20:44:54 -0000 1.7.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Security Design

    OpenACS 4 Security Design

    +OpenACS 4 Security Design

    OpenACS 4 Security Design

    by Richard Li, Archit Shah
    OpenACS docs are written by the named authors, but may be edited @@ -43,10 +43,10 @@ for a secure authentication token. However, the basic architecture here lays the foundation for a secure system and can be easily adapted to a more secure authentication system by forcing all logins to occur over HTTPS.

    Details

    The authentication system issues up to four signed cookies (see below), -with each cookie serving a different purpose. These cookies are:

    namevaluemax-agesecure?
    ad_session_idsession_id,user_idSessionTimeoutno
    ad_user_loginuser_idInfinityno
    ad_user_login_secureuser_id,randomInfinityyes
    ad_secure_tokensession_id,user_id,randomSessionLifetimeyes
    • ad_session_id

      • reissued on any hit separated by more than SessionRenew seconds from the -previous hit that received a cookie

      • is valid only for SessionTimeout seconds

      • is the canonical source for the session ID in ad_conn

    • ad_user_login

      • is used for permanent logins

    • ad_user_login_secure

      • is used for permanent secure logins

      • contains random garbage (ns_time) to prevent attack against the secure +with each cookie serving a different purpose. These cookies are:

        namevaluemax-agesecure?
        ad_session_idsession_id,user_idSessionTimeoutno
        ad_user_loginuser_idInfinityno
        ad_user_login_secureuser_id,randomInfinityyes
        ad_secure_tokensession_id,user_id,randomSessionLifetimeyes
        • ad_session_id

          • reissued on any hit separated by more than SessionRenew seconds from the +previous hit that received a cookie

          • is valid only for SessionTimeout seconds

          • is the canonical source for the session ID in ad_conn

        • ad_user_login

          • is used for permanent logins

        • ad_user_login_secure

          • is used for permanent secure logins

          • contains random garbage (ns_time) to prevent attack against the secure hash

        • ad_secure_token -

          • is a session-level cookie from the browser's standpoint

          • its signature expires in SessionLifetime seconds

          • contains random garbage (ns_time) to prevent attack against the secure +

            • is a session-level cookie from the browser's standpoint

            • its signature expires in SessionLifetime seconds

            • contains random garbage (ns_time) to prevent attack against the secure hash

            • user_id is extraneous

        Authentication Process

        The Tcl function (sec_handler) is called by the request processor to authenticate the user. It first checks the ad_session_id cookie. If there is no valid session in progress, @@ -86,7 +86,7 @@ immediately

      • nothing: if the cookie is present, it remains

      The current state of the permanent login cookies is not taken into account when determining the appropriate action. -

      previous login statepermanent login requestedsecure connectionaction on insecureaction on secure
      otheryysetset
      sameyysetset
      otherynsetdelete
      sameynsetnothing
      samenynothingdelete
      othernydeletedelete
      othernndeletedelete
      samenndeletedelete

      ad_user_login +

      previous login statepermanent login requestedsecure connectionaction on insecureaction on secure
      otheryysetset
      sameyysetset
      otherynsetdelete
      sameynsetnothing
      samenynothingdelete
      othernydeletedelete
      othernndeletedelete
      samenndeletedelete

      ad_user_login callssec_setup_session which actually calls sec_generate_session_id_cookie to generate the new cookie with refer to the appropriate user_id. If the connection is secure @@ -206,13 +206,13 @@ token_id is returned out of the entire set of cached token_ids. In addition, a thread-persistent cache called tcl_secret_tokens is maintained on a per-thread basis.

      Thus, the L2 ns_cache functions as a server-wide LRU cache that has a -minimum of 100 tokens in it. The cache has a dual purpose:

      • LRU cache Note that cache misses will only occur in the +minimum of 100 tokens in it. The cache has a dual purpose:

        • LRU cache Note that cache misses will only occur in the multiple server case, where a user agent may have a signature guaranteed by a -secret token issued by another server in the cluster.

        • signature cache Since the cache always maintains a +secret token issued by another server in the cluster.

        • signature cache Since the cache always maintains a minimum of 100 (set by a parameter) tokens populated at startup, it can be used to provide a random token for signature purposes.

        The per-thread cache functions as an L1 cache that indiscriminately caches -all secret tokens. Note that this is not an LRU cache +all secret tokens. Note that this is not an LRU cache because there is no cache eviction policy per se -- the cache is cleared when the thread is destroyed by AOLserver.

      Security

      Storing information on a client always presents an additional security @@ -234,41 +234,41 @@ thread-persistent global variable. The remaining 120 bits are rehashed to produce 160 bits of output.

    API

    Login/Password

    -ad_user_login user_id Logs the user in as user +ad_user_login user_id Logs the user in as user user_id. Optional forever flag determines whether or not permanent cookies are issued. -

    ad_user_logout Logs the user out.

    ad_check_password user_id password -returns 0 or 1.

    ad_change_password user_id new -password

    Digital Signatures and Signed Cookies

    -ad_sign value Returns the digital signature of this +

    ad_user_logout Logs the user out.

    ad_check_password user_id password +returns 0 or 1.

    ad_change_password user_id new +password

    Digital Signatures and Signed Cookies

    +ad_sign value Returns the digital signature of this value. Optional parameters allow for the specification of the secret used, the token_id used and the max_age for the signature. -ad_verify_signature value signatureReturns +ad_verify_signature value signatureReturns 1 or 0 indicating whether or not the signature matches the value specified. The secret parameter allows for specification of a different secret token to be used.

    -ad_set_signed_cookie name data Sets a -signed cookie name with value data.

    ad_get_signed_cookie name Gets the signed cookie +ad_set_signed_cookie name data Sets a +signed cookie name with value data.

    ad_get_signed_cookie name Gets the signed cookie name. It raises an error if the cookie has been tampered with, or if -its expiration time has passed.

    Session Properties

    ad_set_client_property module name -data Sets a session property with name to value +its expiration time has passed.

    Session Properties

    ad_set_client_property module name +data Sets a session property with name to value data for the module module. The optional secure flag specifies the property should only be set if the client is authorized for secure access (ad_secure_conn_p is true). There is also an optional -session_id flag to access data from sessions other than the current one.

    ad_get_client_property module name -data Gets a session property with name to for the +session_id flag to access data from sessions other than the current one.

    ad_get_client_property module name +data Gets a session property with name to for the module module. The optional secure flag specifies the property should only be retrieved if the client is authorized for secure access (ad_secure_conn_p is true). There is also an optional session_id flag to access data from sessions other than the current one.

    Parameters

    -SessionTimeout the maximum time in seconds (default 1200) -between requests that are part of the same session

    SessionRenew the time in seconds (default 300) between +SessionTimeout the maximum time in seconds (default 1200) +between requests that are part of the same session

    SessionRenew the time in seconds (default 300) between reissue of the session cookie. The minimum time that can pass after a session cookie is issued and before it is rejected is (SessionTimeout - SessionRenew). This parameter is used so that only one session_id cookie is set on a single page even if there are multiple images that are being -downloaded.

    SessionLifetime the maximum possible lifetime of a -session in seconds (default 604800 = 7 days)

    NumberOfCachedSecretTokens the number of secret tokens to +downloaded.

    SessionLifetime the maximum possible lifetime of a +session in seconds (default 604800 = 7 days)

    NumberOfCachedSecretTokens the number of secret tokens to cache. (default 100)

    Future Improvements

    PRNG implementation

    The pseudorandom number generator used in the OpenACS is cryptographically weak, and depends primarily on the randomness of the ns_rand function @@ -339,15 +339,15 @@ points for the system; these vulnerabilities are currently theoretical in nature. The major cryptographic vulnerability of the system stems from the pseudorandom nature of the random number generators used in the system. -

    • Cryptographically weak PRNG see -above.

    • Dependence on sample -SQL command The list of random token that are placed in the secret +

      • Cryptographically weak PRNG see +above.

      • Dependence on sample +SQL command The list of random token that are placed in the secret tokens cache is randomly chosen by the Oracle sample command. This command may not be entirely random, so predicting the contents of the secret tokens cache may not -be as difficult as someone may anticipate.

      • Dependence on -ns_rand The actual token that is +be as difficult as someone may anticipate.

      • Dependence on +ns_rand The actual token that is chosen from the cache to be used is chosen by a call to -ns_rand.

      • ad_secure_conn_p +ns_rand.

      • ad_secure_conn_p As discussed above, the security of the secure sessions authentication system is dependent upon this function.

    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/security-notes.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 29 Mar 2003 20:44:54 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Security Notes

    OpenACS 4 Security Notes

    +OpenACS 4 Security Notes

    OpenACS 4 Security Notes

    by Richard Li
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -56,4 +56,4 @@ The set of string match expressions in the procedure above should be extended appropriately for other registration pages. This procedure does not use ad_parameter or regular expressions for performance reasons, as -it is called by the request processor.

    ($Id$)
    View comments on this page at openacs.org
    +it is called by the request processor.

    ($Id$)
    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Security Requirements

    OpenACS 4 Security Requirements

    +OpenACS 4 Security Requirements

    OpenACS 4 Security Requirements

    by Richard Li
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -15,34 +15,34 @@ vendors require that the user identity be securely validated.

    Security System Overview

    The security system consists of a number of subsystems. -

    Signed Cookies

    +

    Signed Cookies

    Cookies play a key role in storing user information. However, since they are stored in plaintext on a user's system, the validity of cookies is an important issue in trusting cookie information. Thus, we want to be able to validate a cookie, but we also want to validate the cookie without a database hit. -

    • 10.0 Guaranteed Tamper Detection Any tampering of cookie -data should be easily detectable by the web server.

    • 10.1 Performance and Scalability Validation and +

      • 10.0 Guaranteed Tamper Detection Any tampering of cookie +data should be easily detectable by the web server.

      • 10.1 Performance and Scalability Validation and verification of the cookie should be easily scalable and should not require a -database query on every hit.

      Session Properties

      +database query on every hit.

    Session Properties

    Applications should be able to store session-level properties in a database table. -

    • 11.0 Storage API Session-level data should be accessible -via an API.

    • 11.1 Purge Mechanism An efficient pruning mechanism +

      • 11.0 Storage API Session-level data should be accessible +via an API.

      • 11.1 Purge Mechanism An efficient pruning mechanism should be used to prevent old session level properties from filling up the -table.

      Login

      +table.

    Login

    The security system should support the concept of persistent user logins. This persistence takes several forms. -

    • 12.0 Permanent Login Users should be able to maintain a -permanent user login so that they never need to type their password.

    • 12.1 Session Login The security system should support +

      • 12.0 Permanent Login Users should be able to maintain a +permanent user login so that they never need to type their password.

      • 12.1 Session Login The security system should support the concept of a session, with authentication tokens that become invalid -after a certain period of time.

      • 12.2 Session Definition A session is a sequence of +after a certain period of time.

      • 12.2 Session Definition A session is a sequence of clicks by one user from one browser in which no two clicks are separated by -more than some constant (the session timeout).

      • 12.3 Stateless The security system should not require +more than some constant (the session timeout).

      • 12.3 Stateless The security system should not require state that is stored in the server. Required state may reside only in the user request (including cookies), and in the database. A single user should be able to log in to the system even if the user is sent to a different -AOLserver for each step of the login process (e.g., by a load balancer).

      • 12.4 Secure The security system should not store -passwords in clear text in the database.

      • 13.0 SSL Hardware The system must work when the SSL +AOLserver for each step of the login process (e.g., by a load balancer).

      • 12.4 Secure The security system should not store +passwords in clear text in the database.

      • 13.0 SSL Hardware The system must work when the SSL processing occurs outside of the web server (in specialized hardware, in a -firewall, etc.).

    View comments on this page at openacs.org
    +firewall, etc.).

    View comments on this page at openacs.org
    Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/software-versions.html'. Fisheye: No comparison available. Pass `N' to diff? 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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/subsites-design.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/subsites-design.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Subsites Design Document

    OpenACS 4 Subsites Design Document

    +OpenACS 4 Subsites Design Document

    OpenACS 4 Subsites Design Document

    by Rafael H. Schloming
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -41,7 +41,7 @@ URLs to operate together. This requirement would cause some packages to have more configuration options than normal since hard-coding the URLs would not be feasible anymore.

    API

    This section will cover all the APIs relevant to subsites, and so will -consist of portions of the APIs of several systems.

    Packages

    The following package is provided for instantiation of packages. The +consist of portions of the APIs of several systems.

    Packages

    The following package is provided for instantiation of packages. The apm_package.new function can be used to create a package of any type known to the system. The apm_package_types table can be queried for a list of installed packages. (See APM docs for more detail XXX: insert link here)

    @@ -101,7 +101,7 @@
     show errors
     
     
    -

    Site Nodes

    This data model keeps track of what packages are being served from what +

    Site Nodes

    This data model keeps track of what packages are being served from what URLs. You can think of this as a kind of rp_register_directory_map on drugs. This table represents a fully hierarchical site map. The directory_p column indicates whether or not the node is a leaf node. The pattern_p column @@ -182,7 +182,7 @@ show errors -

    Request Processor

    Once the above APIs are used to create packages and mount them on a +

    Request Processor

    Once the above APIs are used to create packages and mount them on a specific site node, the following request processor APIs can be used to allow the package to serve content appropriate to the package instance.

     
    @@ -210,4 +210,4 @@
     a particular configuration of site nodes/packages. As we build more
     fundamental applications that can be applied in more general areas, this
     feature will become more and more in demand since more problems will be
    -solvable by configuration instead of coding.

    View comments on this page at openacs.org
    +solvable by configuration instead of coding.

    View comments on this page at openacs.org
    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.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/subsites-requirements.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/subsites-requirements.html 29 Mar 2003 20:44:54 -0000 1.6.2.2 @@ -1,5 +1,5 @@ -OpenACS 4 Subsites Requirements

    OpenACS 4 Subsites Requirements

    +OpenACS 4 Subsites Requirements

    OpenACS 4 Subsites Requirements

    by Rafael H. Schloming and Dennis Gregorovic
    OpenACS docs are written by the named authors, but may be edited by OpenACS documentation staff. @@ -42,17 +42,17 @@ office. At this point, the Boston and Austin office admins can customize the configurations for each of their bboards, or they can just use the defaults.

    Related Links

    Requirements: Programmer's API

    A subsite API is required for programmers to ensure their packages are -subsite-aware. The following functions should be sufficient for this:

    10.10.0 Package creation

    The system must provide an API call to create a package, and it must be -possible for the context (to which the package belongs) to be specified.

    10.20.0 Package deletion

    The system must provide an API call to delete a package and all related -objects in the subsite's context.

    10.30.0 Object's package information

    Given an object ID, the system must provide an API call to determine the -package (ID) to which the object belongs.

    10.40.0 URL from package

    Given a package (ID), the system must provide an API call to return the -canonical URL for that package.

    10.50.0 Main subsite's package_id

    The system must provide an API call to return a package ID corresponding -to the main subsite's package ID (the degenerate subsite).

    Requirements: The User Interface

    The Programmer's User Interface

    There is no programmer's UI, other than the API described above.

    The Administrator's User Interface

    The UI for administrators is a set of HTML pages that are used to drive +subsite-aware. The following functions should be sufficient for this:

    10.10.0 Package creation

    The system must provide an API call to create a package, and it must be +possible for the context (to which the package belongs) to be specified.

    10.20.0 Package deletion

    The system must provide an API call to delete a package and all related +objects in the subsite's context.

    10.30.0 Object's package information

    Given an object ID, the system must provide an API call to determine the +package (ID) to which the object belongs.

    10.40.0 URL from package

    Given a package (ID), the system must provide an API call to return the +canonical URL for that package.

    10.50.0 Main subsite's package_id

    The system must provide an API call to return a package ID corresponding +to the main subsite's package ID (the degenerate subsite).

    Requirements: The User Interface

    The Programmer's User Interface

    There is no programmer's UI, other than the API described above.

    The Administrator's User Interface

    The UI for administrators is a set of HTML pages that are used to drive the underlying API for package instance management (i.e. adding, removing, or altering packages). It is restricted to administrators of the current subsite such that administrators can only manage their own subsites. Of course, -Site-Wide Administrators can manage all subsites.

    • 20.10.0 Package creation

      20.10.1 The administrator should be able to create a -package and make it available at a URL underneath the subsite.

    • 20.20.0 Package deactivation

      20.20.1 The administrator should be able to deactivate -any package, causing it to be inaccessible to users.

      20.20.5 Deactivating a package makes the package no +Site-Wide Administrators can manage all subsites.

      • 20.10.0 Package creation

        20.10.1 The administrator should be able to create a +package and make it available at a URL underneath the subsite.

      • 20.20.0 Package deactivation

        20.20.1 The administrator should be able to deactivate +any package, causing it to be inaccessible to users.

        20.20.5 Deactivating a package makes the package no longer accessible, but it does not remove data created within the context of -that package.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/18/2000Dennis Gregorovic
    0.2Edited, reviewed08/29/2000Kai Wu
    View comments on this page at openacs.org
    +that package.

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/18/2000Dennis Gregorovic
    0.2Edited, reviewed08/29/2000Kai Wu
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/subsites.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/subsites.html 29 Mar 2003 20:44:55 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Writing OpenACS 4.6 Application Pages

    Writing OpenACS 4.6 Application Pages

    +Writing OpenACS 4.6.2 Application Pages

    Writing OpenACS 4.6.2 Application Pages

    By Rafael H. Schloming and Pete Su


    @@ -8,15 +8,15 @@

    Overview

    In this document, we'll examine the user interface pages of the Notes application in more detail, covering two separate aspects of page -development in OpenACS 4.6. First, we'll talk about the code needed to make +development in OpenACS 4.6.2. First, we'll talk about the code needed to make your pages aware of which application instance they are running in. Second, we'll talk about using the form builder to develop -form-based user interfaces in OpenACS 4.6. While these seem like unrelated +form-based user interfaces in OpenACS 4.6.2. While these seem like unrelated topics, they both come up in the example page that we are going to look at, so it makes sense to address them at the same time.

    Application Instances and Subsites

    -As you will recall from the packages tutorial, the Request -Processor (RP) and Package Manager (APM) in OpenACS 4.6 allow site +As you will recall from the packages tutorial, the Request +Processor (RP) and Package Manager (APM) in OpenACS 4.6.2 allow site administrators to define an arbitrary mapping from URLs in the site to objects representing content. These objects may represent single files, or entire applications. The APM uses the site map to map @@ -70,7 +70,7 @@

    In the Notes example, we are particularly interested in the package_id field. If you study the data model and code, -you'll see why. As we said before in the data modeling tutorial, the Notes application points the +you'll see why. As we said before in the data modeling tutorial, the Notes application points the context_id of each Note object that it creates to the package instance that created it. That is, the context_id corresponds exactly to the package_id that comes in from @@ -257,15 +257,15 @@ visible to that user. The end result is a site where users can come and write notes to themselves.

    -This is a good example of the leverage available in the OpenACS 4.6 +This is a good example of the leverage available in the OpenACS 4.6.2 system. The code that we have written for Notes is not at all more complex than a similar application without access control or site map awareness. By adding a small amount of code, we have taken a small, simple, and special purpose application to something that has the potential to be a very useful, general-purpose tool, complete with multi-user features, access control, and centralized administration.

    Summary

    -In OpenACS 4.6, application pages and scripts can be aware of the package +In OpenACS 4.6.2, application pages and scripts can be aware of the package instance, or subsite in which they are executing. This is a powerful general purpose mechanism that can be used to structure web services in very flexible ways. @@ -277,4 +277,4 @@

    We also saw how to use the templating system's forms API in a simple way, to create forms based pages with minimal duplication of code. -

    ($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/tcl-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tcl-doc.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/tcl-doc.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/tcl-doc.html 29 Mar 2003 20:44:55 -0000 1.8.2.2 @@ -1,5 +1,5 @@ -Documenting Tcl Files: Page Contracts and Libraries

    Documenting Tcl Files: Page Contracts and Libraries

    +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, but may be edited @@ -23,12 +23,12 @@

    The problem with these practices is that the documentation is only accessible by reading the source file itself. For this reason, ACS 3.4 introduces a new API for documenting Tcl files and, on top of that, a -web-based user interface for browsing the documentation:

    • ad_page_contract: Every Tcl page -has a contract that explicitly defines what inputs the page +web-based user interface for browsing the documentation:

      • ad_page_contract: Every Tcl page +has a contract that explicitly defines what inputs the page expects (with more precision than ad_page_variables) and incorporates metadata about the page (what used to live in the top-of-page comment). Like ad_page_variables, ad_page_contract -also sets the specified variables in the context of the Tcl page.

      • ad_library: To be +also sets the specified variables in the context of the Tcl page.

      • ad_library: To be called at the top of every library file (i.e., all files in the /tcl/ directory under the server root and *-procs.tcl files under /packages/).

      @@ -73,38 +73,38 @@

      Note that: -

      • By convention, ad_page_contract should be preceded -by a comment line containing the file's path. The comment is on +

        • By convention, ad_page_contract should be preceded +by a comment line containing the file's path. The comment is on line 1, and the contract starts on line 2. -

        • ad_page_contract's first argument is +

        • ad_page_contract's first argument is the list of expected arguments from the HTTP query (version_id, public_p, kind, and format). Like ad_page_variables, ad_page_contract sets the corresponding Tcl variables when the page is executed. -

        • Arguments can have defaults, specified using the same +

        • Arguments can have defaults, specified using the same syntax as in the Tcl proc (a two-element list where the first element is the parameter name and the second argument is the default value). -

        • Arguments can have flags, specified by following the +

        • Arguments can have flags, specified by following the name of the query argument with a colon and one or more of the following -strings (separated by commas):

          • optional: the query argument doesn't +strings (separated by commas):

            • optional: the query argument doesn't need to be provided; if it's not, the variable for that argument simply won't be set. For instance, if I call the script above without a public_p in the query, then in the page body [info exists public_p] will return 0. -

            • integer: the argument must be an integer +

            • integer: the argument must be an integer (ad_page_contract will fail and display and error if not). This flag, like the next, is intended to prevent clients from fudging query arguments to trick scripts into executing arbitrary SQL. -

            • sql_identifier: the argument must be a SQL +

            • sql_identifier: the argument must be a SQL identifier (i.e., [string is wordchar $the_query_var] must return true). -

            • trim: the argument will be [string +

            • trim: the argument will be [string trim]'ed. -

            • multiple: the argument may be specified +

            • multiple: the argument may be specified arbitrarily many times in the query string, and the variable will be set to a list of all those values (or an empty list if it's unspecified). This is analogous to the -multiple-list flag to @@ -118,7 +118,7 @@ then $dest_user_id is set to [list 913 891 9]. -

            • array: the argument may be specified +

            • array: the argument may be specified arbitrarily many times in the query string, with parameter names with suffixes like _1, _2, _3, etc. The variable is set to a list of all those values (or an empty list if none are @@ -128,23 +128,23 @@ ?dest_user_id_0=913&dest_user_id_1=891&dest_user_id_2=9

              -then $dest_user_id is set to [list 913 891 9].

          • You can provide structured, HTML-formatted documentation for your -contract. Note that format is derived heavily from Javadoc: a +then $dest_user_id is set to [list 913 891 9].

        • You can provide structured, HTML-formatted documentation for your +contract. Note that format is derived heavily from Javadoc: a general description of the script's functionality, followed optionally by a series of named attributes tagged by at symbols (@). You are encouraged to provide: -

          • A description of the functionality of the page. If the description +

            • A description of the functionality of the page. If the description contains more than one sentence, the first sentence should be a brief summary. -

            • A @param tag for each allowable query +

            • A @param tag for each allowable query argument. The format is

               
               @param parameter-name description...
               
              -
            • An @author tag for each author. Specify the -author's name, followed his or her email address in parentheses.

            • A @creation-date tag indicating when the -script was first created.

            • A @cvs-id tag containing the page's CVS +

            • An @author tag for each author. Specify the +author's name, followed his or her email address in parentheses.

            • A @creation-date tag indicating when the +script was first created.

            • A @cvs-id tag containing the page's CVS identification string. Just use $Id: tcl-documentation.html,v 1.2 2000/09/19 07:22:35 ron Exp $ when creating the file, and CVS will substitute an appropriate string when you check the file in.

            @@ -182,9 +182,9 @@ the script's functionality, followed optionally by a series of named attributes tagged by at symbols (@). HTML formatting is allowed. You are encouraged to provide: -

            • An @author tag for each author. Specify the -author's name, followed his or her email address in parentheses.

            • A @creation-date tag indicating when the -script was first created.

            • A @cvs-id tag containing the page's CVS +

              • An @author tag for each author. Specify the +author's name, followed his or her email address in parentheses.

              • A @creation-date tag indicating when the +script was first created.

              • A @cvs-id tag containing the page's CVS identification string. Just use $Id: tcl-documentation.html,v 1.2 2000/09/19 07:22:35 ron Exp $ when creating the file, and CVS will -substitute an appropriate string when you check the file in.

              ($Id$)
          View comments on this page at openacs.org
          +substitute an appropriate string when you check the file in.

        ($Id$)
    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/templates.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/templates.html 29 Mar 2003 20:44:55 -0000 1.8.2.2 @@ -1,9 +1,9 @@ -Using Templates in OpenACS 4.6

    Using Templates in OpenACS 4.6

    By Pete Su


    +Using Templates in OpenACS 4.6.2

    Using Templates in OpenACS 4.6.2

    By Pete Su


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

    Overview

    -The OpenACS 4.6 Template System (ATS) is designed to allow developers to +The OpenACS 4.6.2 Template System (ATS) is designed to allow developers to cleanly separate application logic from display logic. The intent is to have all of the logic related to manipulating the database and other application state data in one @@ -160,12 +160,12 @@

    Summary

    Templates separate application logic from display logic by requiring the developer to write pages in two stages, one file for database -queries and application logic, and another for display. In OpenACS 4.6, the +queries and application logic, and another for display. In OpenACS 4.6.2, the logic part of the page is just a .tcl that sets up data sources that are used by the display part of the page. The display part of the page is an .adp file with some special tags and notations for dealing with display logic and inserting properties into the text of the page. Later on we'll get into templates more deeply, and show how to use database queries as data sources. -

    ($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/unix-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/unix-install.html,v diff -u -r1.6.2.1 -r1.6.2.2 --- openacs-4/packages/acs-core-docs/www/unix-install.html 24 Nov 2002 21:29:18 -0000 1.6.2.1 +++ openacs-4/packages/acs-core-docs/www/unix-install.html 29 Mar 2003 20:44:55 -0000 1.6.2.2 @@ -1,2 +1,2 @@ -Chapter�2.�Installing on Unix/Linux
    View comments on this page at openacs.org
    +Chapter 3. Installing on Unix/Linux
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/win-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/win-install.html,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/win-install.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/win-install.html 29 Mar 2003 20:44:55 -0000 1.8.2.2 @@ -1,2 +1,2 @@ -Chapter�3.�Installing on Windows

    Chapter�3.�Installing on Windows

    View comments on this page at openacs.org
    +Chapter 4. Installing on Windows

    Chapter 4. Installing on Windows

    View comments on this page at openacs.org
    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.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-core-docs/www/win2k-installation.html 24 Nov 2002 21:29:18 -0000 1.8.2.1 +++ openacs-4/packages/acs-core-docs/www/win2k-installation.html 29 Mar 2003 20:44:55 -0000 1.8.2.2 @@ -1,257 +1,6 @@ -OpenACS Installation Guide for Windows2000

    OpenACS Installation Guide for Windows2000

    By Matthew Burke and Curtis Galloway


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

    NOTE: These instructions were - valid for ACS v4, but have not been tested with OpenACS. Currently - (8/2002), the best option to get OpenACS 4.6 running on Windows +OpenACS Installation Guide for Windows2000

    OpenACS Installation Guide for Windows2000

    Currently the best option to get OpenACS 4.6.2 running on Windows is to use VMware and John Sequeira's Oasis VM distribution -

    Overview

    - With the recent release of a win32 version of AOLserver, it is now - possible to run the OpenACS on Windows2000 and Windows98. This document - explains the steps necessary to get the OpenACS installed and running on your - machine.

    Note:

    We do not recommend running a production - server on Windows98. But the platform is more than sufficient for working - the problem sets and - for getting a feel for the OpenACS. -

    You'll need to use the ArsDigita binary distribution of AOLserver - for the Win32 platform, which contains patches for several problems we - have come across in the default AOLserver binary distribution. See the ArsDigita AOLserver 3 distribution page for - details.

    You can download the binary distribution from the ArsDigita download page - under "ArsDigita AOLserver 3 Binary Distribution for Win32." - Please read the release notes in the distribution for configuration notes - specific to the version you are downloading.

    Prerequisites

    It is helpful if you have Oracle interMedia Text for full-text searches. - We're also trying to make our system work with the PLS System, - available free from http://www.pls.com. -

    Although the zsh shell is the only command-line tool - required to install the OpenACS, if you are a UNIX person used to typing - ls instead of dir you'll get along much - better with the Cygwin toolkit from RedHat (available at http://sourceware.cygnus.com/cygwin). - This is a development library and set of tools that gives you a very - UNIX-like environment under Windows. In particular, it includes - bash, gzip and tar, which you can - use to perform the OpenACS installation instead of WinZip and zsh.

    Your Oracle installation

    - When you install Oracle, a good rule of thumb is "every default - setting is wrong." We will not discuss Oracle configuration here - except to mention that the OpenACS requires Oracle's NLS_DATE_FORMAT - parameter be set to 'YYYY-MM-DD'. Fixing this depends on whether - Oracle Administration Assistant for Windows NT (yes, - that's Windows

    NT
    ) will run on your - machine or not (in some cases, it will complain about Microsoft Managment - Console not being installed).

    If it runs on your machine, proceed as follows:

    1. Run Oracle Administration Assistant for Windows NT

    2. Navigate using the Explorer-style control in the left panel and - select the Oracle Home for the database you wish to use.

    3. Bring up its properties dialog and add a parameter NLS_DATE_FORMAT - with value 'YYYY-MM-DD' (without the - quotes)

    4. Verify the date format by logging into the database using SQL Plus - and run the following query: select sysdate from - dual;

    Otherwise you will need to perform a little registry surgery as - follows:

    1. Run regedit and navigate down the registry keys to - HKEY_LOCAL_MACHINE\Software\ORACLE.

    2. - Choose the appropriate subtree; this will be HOME0 if - you only have on einstallation of Oracle. - -

      - If you are an Oracle achiever and have more than one Oracle - installation on your machine, you will see HOME0, HOME1, - HOME2, etc. Choose the subtree that corresponds to the - Oracle installtion you wish to use with the OpenACS. -

      -

    3. If the NLS_DATE_FORMAT key is already present, - double-click on its value and change it to 'YYYY-MM-DD' - (without the quotes). If the key does not - exist, choose Edit->New->String Value from the menu - and type NLS_DATE_FORMAT for the name of the new value to - create it. Then double-click on the empty value to change it.

    4. Verify the date format by logging into the database using SQL Plus - and run the following query: select sysdate from - dual;

    For more information on Oracle configuration look at http://photo.net/wtr/oracle-tips - or search the Web/db Q&A - Forum. One other note: the "nuke a user" admin page and - Intermedia won't run unless you set open_cursors = 500 - for your database. For more information on Oracle configuration look at - http://photo.net/wtr/oracle-tips.html - or search the Web/db Q&A - Forum. One other note: the "nuke a user" admin page and - Intermedia won't run unless you set open_cursors = 500 - for your database.

    The ArsDigita binary installation

    - Extract the ArsDigita AOLserver distribution onto the C: - drive into the default aol30 directory. You can install it - on any drive, but it will make your life easier if you keep the AOLserver - binary and your OpenACS instance on the same drive. For the rest of these - instructions, we'll assume that you used drive C:. -

    Untar the OpenACS

    - We recommend rooting webserver content in c:\web. Since most - servers these days are expected to run multiple services from multiple IP - addresses, each server gets a subdirectory from c:\web. For - example, http://scorecard.org would be rooted at - c:\web\scorecard on one of our machines and if - http://jobdirect.com were on the same box then it would be - at c:\web\jobdirect. -

    For the sake of argument, we're going to assume that your service - is called "yourdomain", is going to be at - http://yourdomain.com and is rooted at - c:\web\yourdomain in the Windows 2000 file system. Note that - you'll find our definitions files starting out with - "yourdomain.com".

    • download the OpenACS (see above) into - c:\temp\acs.tar.gz

    • use WinZip (or equivalent) to extract the files to - c:\web\yourdomain

    - You'll now find that c:\web\yourdomain\www contains the - document root and c:\web\yourdomain\tcl contains Tcl scripts - that are loaded when the AOLserver starts up. -

    Feeding Oracle the Data Model

    - The entire server will behave in an unhappy manner if it connects to - Oracle and finds that, for example, the users table does not exist. Thus - you need to connect to Oracle as whatever user the AOLserver will connect - as, and feed Oracle the table definitions. -

    • - load the states, country_codes and - counties tables using the load-geo-tables - shell script in the c:\web\yourdomain\www\install - directory. You will need to open a console window and run

      -zsh load-geo-tables foo/foopassword
      -

      - You most likely will see a slew of "Commit point reached . . . - " messages. This does not indicate a problem. - - -

    • - cd to c:\web\yourdomain\www\doc\sql and feed Oracle the - .sql files that you find there. There is a meta-loader file, - load-data-model.sql, that includes the other files in the proper - order. To use it, open a console window and run -

      -sqlplus foo/foopassword < load-data-model.sql
      -
    • - If you have interMedia installed, while still in - c:\web\yourdomain\www\doc\sql, run -

      -zsh load-site-wide-search foo foopassword ctxsys-password
      -

      - Note that there's no slash between foo and - foopassword here. The third argument, - ctxsys-password, is the password for interMedia - Text's special ctxsys user. -

    Configuring AOLServer

    You will need two configuration files. The first is a Tcl file with - configuration information for AOLserver. This should be called - yourdomain and should be located in - c:\aolserve3_0. The second is an .ini file that configures - the OpenACS and is discussed below. Note that pathnames in - yourdomain must use forward slashes rather than the Windows - back slashes. This is also true for the .ini file.

    The following items must be defined in yourdomain:

    • three database pools: main, subquery, and log. They must be named - as such. The default pool will be "main".

    • the auxconfig directory which contains the .ini file: - c:\web\yourdomain\parameters

    • the pageroot: c:\web\yourdomain\www

    • the directory containing the TclLibrary: - c:\web\yourdomain\tcl

    - You can use our template file as a starting - point (you'll need to save this file with a rather than .txt - extension). -

    Configuring OpenACS itself

    - If you want a system that works, go to - c:\web\yourdomain\parameters and copy ad.ini to - yourdomain.ini (or any other name different from - ad.ini). You don't actually have to delete - ad.ini. -

    Each section of yourdomain.ini has a hardcoded - "yourservername" in the name (e.g. - [ns/server/yourservername/acs]). This means that the OpenACS - will ignore your configuration settings unless your AOLserver name - happens to be "yourservername". Therefore you must go through - yourdomain.ini and change "yourservername" to - whatever you're calling this particular AOLserver (look at the - server name in the nsd file for a reference).

    Unless you want pages that advertise a community called - "Yourdomain Network" owned by - "webmaster@yourdomain.com", you'll probably want to edit - the text of yourdomain.ini to change system-wide parameters. - If you want to see how some of these are used, a good place to look is - c:\web\yourdomain\tcl\ad-defs. The Tcl function, - ad_parameter, is used to grab parameter values from the .ini - file.

    Starting the Service

    - Now you're ready to start things up. Before installing as a Windows - service, you might want to test the setup for configuration errors. Open - up a console window and go to c:\aol30. Then run -

    -bin\nsd -ft yourdomain.tcl
    -

    This will print all the AOLserver messages to the console so you can see - them. -

    Try to connect to your new server with a web browser. If you see the - message "Error in serving group pages", you probably forgot to - copy the ad.ini file in c:\web\yourdomain\parameters If - everything seems ok, you can kill the server with Control-c and then - issue the following command to install as a Windows service:

    -bin\nsd -I -s yourdomain -t yourdomain.tcl
    -

    You can now configure error recovery and other Windows aspects of the - service from the Services control panel. If you make further changes to - yourdomain or yourdomain.ini you should stop - and start the service from the Services control panel. -

    Configuring Permissions

    - Now, you need to protect the proper administration directories of the - OpenACS. You decide the policy although we recommend requiring the admin - directories be accessible only via an SSL connection. Here are the - directories to consider protecting: -

    • /doc (or at least /doc/sql/ since some AOLserver configurations - will allow a user to execute SQL files)

    • /admin

    • any private admin dirs for a module you might have written that are - not underneath the /admin directory

    Adding Yourself as a User and Making Yourself a Sysadmin

    - The ArsDigita Community System will define two users: system and - anonymous. It will also define a user group of system administrators. - You'll want to add yourself as a user (at /register/ ) and then add - yourself as as member of the site-wide administration group. Start by - logging out as yourself and logging in as the system user (email of - "system"). Change the system user's password. Visit the - https://yourservername.com/admin/ug/ directory and add your - personal user as a site-wide administrator. Now you're bootstrapped! -

    If you do not know what the system user's password is connect to - Oracle using SQL Plus and run the following query:

    -select password from users where last_name = 'system';
    -

    Closing Down Access

    - The OpenACS ships with a user named "anonymous" (email - "anonymous") to serve as a content owner. If you're - operating a restricted-access site, make sure to change the anonymous - user's password. In recent versions of the OpenACS you cannot log into - "anonymous" because the account does not have a valid user - state. Log in as a sysadmin and change the anonymous user's password - from https://yourservername/admin/users. You should read the - documentation for user registration and - access control and decide what the appropriate user state is for - anonymous on your site. -

    Where to Find What

    - A few pointers: -

    • the /register directory contains the login and registration - scripts. You can easily redirect someone to /register/index to have - them login or register.

    • the /pvt directory is for user-specific pages. They can only be - accessed by people who have logged in.

    Making sure that it works

    - Run the acceptance tests in /doc/acceptance-test -

    Running Multiple Instances of the OpenACS

    - You can run multiple instances of the OpenACS on a physical machine but they - must each be set up as a separate Windows service. Each instance of the - OpenACS must have its own: -

    • Oracle tablespace and a user account with the appropriate - permissions on that tablespace. Each of these tablespaces must have the - OpenACS data model loaded.

    • file with the appropriate settings including server name, - auxconfig, ipaddress, and port.

    • Copy of the acs files in an appropriate directory under - c:\web.

    Suppose you wish to run two services: lintcollectors.com and - iguanasdirect.com. You would need the following: -

    • an Oracle tablespace, lintcollectors with a user - lintcollectors and password secretlint

    • an Oracle tablespace, iguanasdirect with a user - iguanasdirect and password secretiguanas

    For each of these tablespaces/users you would load the OpenACS data model as - described above. Then in c:\aolserver3_0 - create files for each service, i.e. lintcollectors and - iguanasdirect. These files would point to their respective - pageroots, c:\web\lintcollectors\www and - c:\web\iguanasdirect\www; their respective auxconfigdirs, - c:\web\lintcollectors\parameters and - c:\web\iguanasdirect\parameters; etc. In the respective - auxconfigdirs would be the files lintcollectors.ini and - iguanasdirect.ini. -

    Now open a console window and go to c:\aol30. You'll - start up the two services as follows:

    -bin\nsd -I -s lintcollectors -t lintcollectors.tcl
    -bin\nsd -I -s iguanasdirect -t iguanasdirect.tcl
    -

    In the services control panel you should see two services: - AOLserver-lintcollectors and - AOLserver-iguanasdirect. -

    ($Id$)
    View comments on this page at openacs.org
    +

    ($Id$)
    View comments on this page at openacs.org