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.19.2.2 -r1.19.2.3 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 8 Dec 2003 15:41:16 -0000 1.19.2.2 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 15 Dec 2003 15:03:46 -0000 1.19.2.3 @@ -1 +1 @@ -Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 3.3oacs1
Install OpenACS 5.0.0b4
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a New Service
5. Upgrading
Upgrading
6. Maintenance
Hosting Web Sites
Database Management
Backup and Recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
+Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 3.3oacs1
Install AOLserver 4
Install OpenACS 5.0.0b4
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a New Service
5. Upgrading
Upgrading
6. Maintenance
Hosting Web Sites
Database Management
Backup and Recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/analog-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/analog-install.html,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/acs-core-docs/www/analog-install.html 8 Dec 2003 15:41:16 -0000 1.5.2.2 +++ openacs-4/packages/acs-core-docs/www/analog-install.html 15 Dec 2003 15:03:46 -0000 1.5.2.3 @@ -1,20 +1,20 @@ Install Analog web file analyzer

Install Analog web file analyzer

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

[root@yourserver aolserver]# cd /usr/local/src
-[root@yourserver src]# tar xzf /tmp/analog-5.32.tar.gz
-[root@yourserver src]# cd analog-5.32
-[root@yourserver analog-5.32]# make
+/tmp.  Unpack, compile, and install analog.

[root aolserver]# cd /usr/local/src
+[root src]# tar xzf /tmp/analog-5.32.tar.gz
+[root src]# cd analog-5.32
+[root analog-5.32]# make
 cd src && make
 make[1]: Entering directory `/usr/local/src/analog-5.32/src'
 (many lines omitted)
 ***IMPORTANT: You must read the licence before using analog
 ***
 make[1]: Leaving directory `/usr/local/src/analog-5.32/src'
-[root@yourserver analog-5.32]# cd ..
-[root@yourserver src]# mv analog-5.32 /usr/share/
-[root@yourserver src]#
-
cd /usr/local/src
+[root analog-5.32]# cd ..
+[root src]# mv analog-5.32 /usr/share/
+[root src]#
+cd /usr/local/src
 tar xzf /tmp/analog-5.32.tar.gz
 cd analog-5.32
 make
 cd ..
-mv analog-5.32 /usr/share/

See also the section called “Set up Log Analysis Reports - OPTIONAL”

View comments on this page at openacs.org
+mv analog-5.32 /usr/share/

See also the section called “Set up Log Analysis Reports - OPTIONAL”

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.23.2.3 -r1.23.2.4 --- openacs-4/packages/acs-core-docs/www/aolserver.html 8 Dec 2003 15:41:16 -0000 1.23.2.3 +++ openacs-4/packages/acs-core-docs/www/aolserver.html 15 Dec 2003 15:03:46 -0000 1.23.2.4 @@ -1,8 +1,8 @@ -Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup

+Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -
  1. Unpack the Aolserver tarball.�Download the aolserver tarball and unpack it.

    [root@yourserver root]# cd /usr/local/src
    -[root@yourserver src]# wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
    +        
  1. Unpack the Aolserver tarball.�Download the aolserver tarball and unpack it.

    [root root]# cd /usr/local/src
    +[root src]# wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
     --15:38:08--  http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
                => `aolserver3.3oacs1.tar.gz'
     Resolving uptime.openacs.org... done.
    @@ -13,18 +13,18 @@
     100%[====================================>] 3,858,074     66.56K/s    ETA 00:00
     
     15:39:05 (66.56 KB/s) - `aolserver3.3oacs1.tar.gz' saved [3858074/3858074]
    -[root@yourserver src]# tar xzf aolserver3.3oacs1.tar.gz
    -[root@yourserver src]#
    -
    cd /usr/local/src
    +[root src]# tar xzf aolserver3.3oacs1.tar.gz
    +[root src]#
    +cd /usr/local/src
     wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
    -tar xzf aolserver3.3oacs1.tar.gz

    This section also relies on some OpenACS files, which you can get with the section called “Unpack the OpenACS tarball”.

  2. Compile AOLserver.�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
    +tar xzf aolserver3.3oacs1.tar.gz

    This section also relies on some OpenACS files, which you can get with the section called “Unpack the OpenACS tarball”.

  3. Compile AOLserver.�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 root]# cd /usr/local/src/aolserver
    +[root aolserver]# ./conf-clean
     cat: BUILD-MODULES: No such file or directory
     Done.
    -[root@yourserver aolserver]#
    mkdir -p /usr/local/aolserver
    +[root aolserver]#mkdir -p /usr/local/aolserver
     cd /usr/local/src/aolserver
    -./conf-clean

    +./conf-clean

    If you are using Oracle, edit conf-db and change postgresql to @@ -35,8 +35,8 @@ the environment variables properly.

    conf-inst should contain the location where AOLserver is to be installed. Overwrite the - tarball's default value with our default value, /usr/local/aolserver:

    [root@yourserver aolserver]# echo "/usr/local/aolserver" > conf-inst
    -[root@yourserver aolserver]#

    conf-make should contain the + tarball's default value with our default value, /usr/local/aolserver:

    [root aolserver]# echo "/usr/local/aolserver" > conf-inst
    +[root aolserver]#

    conf-make should contain the name of the GNU Make command on your system. It defaults to gmake. Debian users: ln -s /usr/bin/make /usr/bin/gmake.

    Set an environment variable that the nspostgres driver Makefile needs to compile correctly and run @@ -46,7 +46,7 @@ postgresql from apt-get may need to make these symlinks: ln -s /usr/include/postgresql/ /usr/include/pgsql - and ln -s /usr/lib/postgresql /usr/local/pgsql)

    [root@yourserver aolserver]# export POSTGRES=/usr/local/pgsql; ./conf
    +          and ln -s /usr/lib/postgresql /usr/local/pgsql)

    [root aolserver]# export POSTGRES=/usr/local/pgsql; ./conf
     Building in /usr/local/aolserver
     with the following modules:
     aolserver
    @@ -67,28 +67,28 @@
     Creating  ...
     ==================================================================
     Done Building Sat Mar  8 10:31:35 PST 2003
    -[root@yourserver aolserver]# 

    +[root aolserver]#

    This takes about 5 minutes. It builds aolserver, several modules, and the database driver. (Upgraders, note that the postgres database driver has changed from postgres.so to nspostgres.so). All of the results are logged to files in /usr/local/src/aolserver/log. If you run into problems running AOLserver, check these files for build errors.

  4. 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-5.0.0b4/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
      +	  to use both databases, install both.

      • Oracle

        [root aolserver]# cd /usr/local/aolserver/bin
        +[root bin]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
        +[root bin]# chmod 750 nsd-oracle
        +[root bin]#
        +cd /usr/local/aolserver/bin
         cp /tmp/openacs-5.0.0b4/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-5.0.0b4/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
      +chmod 750 nsd-oracle
    • PostgreSQL

      [root aolserver]# cd /usr/local/aolserver/bin
      +[root bin]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +[root bin]# chmod 755 nsd-postgres
      +[root bin]#
      +cd /usr/local/aolserver/bin
       cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      -chmod 755 nsd-postgres
  5. Install tDOM.�Download the tDOM +chmod 755 nsd-postgres

  • Install tDOM.�Download the tDOM tarball, unpack it, adjust the configuration file to match our patched - distribution of aolserver, and compile it.

    [root@yourserver root]# cd /usr/local/src
    -[root@yourserver src]# wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
    +        distribution of aolserver, and compile it.

    [root root]# cd /usr/local/src
    +[root src]# wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
     --16:40:58--  http://www.tdom.org/tDOM-0.7.8.tar.gz
                => `tDOM-0.7.8.tar.gz'
     Resolving www.tdom.org... done.
    @@ -100,42 +100,42 @@
     
     16:41:04 (138.06 KB/s) - `tDOM-0.7.8.tar.gz' saved [826613/826613]
     
    -[root@yourserver src]# tar xzf tDOM-0.7.8.tar.gz
    -[root@yourserver src]# cd tDOM-0.7.8/unix
    -[root@yourserver unix]#
    -
    cd /usr/local/src
    +[root src]# tar xzf tDOM-0.7.8.tar.gz
    +[root src]# cd tDOM-0.7.8/unix
    +[root unix]#
    +cd /usr/local/src
     wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
     tar xzf tDOM-0.7.8.tar.gz
    -cd tDOM-0.7.8/unix

    Edit the file CONFIG and change this section:

    # ----------------------------------------------------
    +cd tDOM-0.7.8/unix 

    Edit the file CONFIG and change this section:

    # ----------------------------------------------------
     # aolsrc="/usr/src/aolserver-3.4"
     # ../configure --enable-threads --disable-tdomalloc \
     #   --with-aolserver=$aolsrc \
     #   --with-tcl=$aolsrc/tcl8.3.4/unix 

    to

    # ----------------------------------------------------
     aolsrc="/usr/local/src/aolserver/aolserver"
     ../configure --enable-threads --disable-tdomalloc \
       --with-aolserver=$aolsrc \
    -  --with-tcl=$aolsrc/tcl8.3.2/unix

    And configure and compile:

    [root@yourserver unix]# sh CONFIG
    +  --with-tcl=$aolsrc/tcl8.3.2/unix

    And configure and compile:

    [root unix]# sh CONFIG
     creating cache ./config.cache
     checking for memmove... yes
       (many lines omitted)
     creating Makefile
     creating tdomConfig.sh
    -[root@yourserver unix]# make
    +[root unix]# make
     gcc -pipe -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1
     -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 
       (many lines omitted)
               -Wl,-rpath,/usr/local/lib -o tcldomsh;\
     fi
    -[root@yourserver unix]# cp libtdom0.7.8.so /usr/local/aolserver/bin/
    -[root@yourserver unix]# cd /usr/local/aolserver/bin/
    -[root@yourserver bin]# ln -s libtdom0.7.8.so libtdom.so
    -[root@yourserver bin]#
    +[root unix]# cp libtdom0.7.8.so /usr/local/aolserver/bin/
    +[root unix]# cd /usr/local/aolserver/bin/
    +[root bin]# ln -s libtdom0.7.8.so libtdom.so
    +[root bin]#
     
    -
    sh CONFIG
    +sh CONFIG
     make
     cp libtdom0.7.8.so /usr/local/aolserver/bin/
     cd /usr/local/aolserver/bin
    -ln -s libtdom0.7.8.so libtdom.so
  • Install nsopenssl +ln -s libtdom0.7.8.so libtdom.so

  • Install nsopenssl (OPTIONAL)

  • Install Full Text Search with OpenFTS (OPTIONAL)

  • Install nspam (OPTIONAL)

  • Test AOLserver.�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 @@ -144,10 +144,10 @@ 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
    +      /usr/local/aolserver/servers.

    [root root]# cd /usr/local/aolserver
    +[root aolserver]# chown -R root.web log servers
    +[root aolserver]# chmod -R g+w log servers
    +[root 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
    @@ -156,17 +156,17 @@
     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]#
    -
    
    +[root 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 +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.

    [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...
    +          IP address.

    [root aolserver]# ./bin/nsd -t sample-config.tcl -u nobody -g web
    +[root 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.
    @@ -181,15 +181,15 @@
               didn't guess your hostname or ip correctly, you'll get a
               false negative test.
     
    -        

    [root@yourserver aolserver]# lynx localhost:8000

    +

    [root 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. 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 aolserver]# killall nsd
    +[root aolserver]#

    The killall command will kill all processes with the name nsd, @@ -230,4 +230,4 @@ set hostname [ns_info hostname] #set address [ns_info address] set address 0.0.0.0

  • Install - Analog web file analyzer. (OPTIONAL)

  • ($Id$)
    View comments on this page at openacs.org
    + Analog web file analyzer. (OPTIONAL)

    ($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.21.2.3 -r1.21.2.4 --- openacs-4/packages/acs-core-docs/www/apm-design.html 8 Dec 2003 15:41:16 -0000 1.21.2.3 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 15 Dec 2003 15:03:46 -0000 1.21.2.4 @@ -87,7 +87,7 @@ packages for other OpenACS 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, Index: openacs-4/packages/acs-core-docs/www/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -r1.15.2.4 -r1.15.2.5 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 8 Dec 2003 15:41:16 -0000 1.15.2.4 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 15 Dec 2003 15:03:46 -0000 1.15.2.5 @@ -49,16 +49,16 @@

  • Login as root. The following commands will install the export script:

    -                joeuser:~$ su -
    +                [joeuser ~]$ su -
                     Password: ***********
    -                root:~# cp /tmp/export-oracle.txt /usr/sbin/export-oracle
    -              root:~# chmod 700 /usr/sbin/export-oracle
  • + [root ~]# cp /tmp/export-oracle.txt /usr/sbin/export-oracle + [root ~]# chmod 700 /usr/sbin/export-oracle

  • Setup the export directory; this is the directory where backups will be stored. We recommend the directory /ora8/m02/oracle-exports.

    -                root:~# mkdir /ora8/m02/oracle-exports
    -                root:~# chown oracle.dba /ora8/m02/oracle-exports
    -              root:~# chmod 770 /ora8/m02/oracle-exports
  • + [root ~]# mkdir /ora8/m02/oracle-exports + [root ~]# chown oracle.dba /ora8/m02/oracle-exports + [root ~]# chmod 770 /ora8/m02/oracle-exports

  • Now edit /usr/sbin/export-oracle and change the SERVICE_NAME and @@ -70,7 +70,7 @@

    Test the export procedure by running the command:

    -                root:~# /usr/sbin/export-oracle
    +                [root ~]# /usr/sbin/export-oracle
                     mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory
     
                     Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000
    @@ -106,16 +106,16 @@
                     . exporting dimensions
                     . exporting post-schema procedural objects and actions
                     . exporting statistics
    -              Export terminated successfully without warnings.
  • PostgreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

    [root@localhost root]# su - service0
    -            [service0@localhost service0]$ pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp service0
    -            [service0@localhost service0]$ ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp 
    +              Export terminated successfully without warnings.
  • PostgreSQL.�Create a backup file and verify that it was created and has a reasonable size (several megabytes).

    [root root]# su - service0
    +            [service0 service0]$ pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp service0
    +            [service0 service0]$ ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp 
                 -rw-rw-r-x    1 service0  service0   4005995 Feb 21 18:28 /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
    -            [service0@localhost service0]$ exit
    -            [root@localhost root]#
    -            
    su - service0
    +            [service0 service0]$ exit
    +            [root root]#
    +            su - service0
                 pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp openacs-dev
                 ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
    -            exit
  • Back up the file system.�Back up all of the files in the service, including the + exit

  • Back up the file system.�Back up all of the files in the service, including the database backup file but excluding the auto-generated supervise directory, which is unneccesary and has complicated permissions.

    In the tar command,

    [root@yourserver root]# su - service0
    -        [service0@yourserver service0]$ tar -cpsj --exclude /var/lib/aolserver/service0/etc/daemontools/supervise --file /tmp/service0-backup.tar.bz2 /var/lib/aolserver/service0/ 
    +            recursive backup.

  • [root root]# su - service0
    +        [service0 service0]$ tar -cpsj --exclude /var/lib/aolserver/service0/etc/daemontools/supervise --file /tmp/service0-backup.tar.bz2 /var/lib/aolserver/service0/ 
             tar: Removing leading `/' from member names
    -        [service0@yourserver service0]$
  • Suffer a catastrophic failure on your production system.�(We'll simulate this step)

    [root@yourserver root]# svc -d /service/service0
    -        [root@yourserver root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
    -        [root@yourserver root]# rm /service/service0
    +        [service0 service0]$
  • Suffer a catastrophic failure on your production system.�(We'll simulate this step)

    [root root]# svc -d /service/service0
    +        [root root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
    +        [root root]# rm /service/service0
             rm: remove symbolic link `/service/service0'? y
    -        [root@yourserver root]# ps -auxw | grep service0
    +        [root root]# ps -auxw | grep service0
             root      1496  0.0  0.0  1312  252 ?        S    16:58   0:00 supervise service0
    -        [root@yourserver root]# kill 1496
    -        [root@yourserver root]# ps -auxw | grep service0
    -        [root@yourserver root]# su - postgres
    -        [postgres@yourserver pgsql]$ dropdb service0
    +        [root root]# kill 1496
    +        [root root]# ps -auxw | grep service0
    +        [root root]# su - postgres
    +        [postgres pgsql]$ dropdb service0
             DROP DATABASE
    -        [postgres@yourserver pgsql]$ dropuser service0
    +        [postgres pgsql]$ dropuser service0
             DROP USER
    -        [postgres@yourserver pgsql]$ exit
    +        [postgres pgsql]$ exit
             logout
    -        [root@yourserver root]#
  • Recovery.�

    1. Restore the operating system and required software. + [root root]#

    2. Recovery.�

      1. Restore the operating system and required software. You can do this with standard backup processes or by keeping copies of the install material (OS CDs, OpenACS tarball and supporting software) and repeating the install - guide. Recreate the service user (service0).

      2. Restore the OpenACS files and database backup file.

        [root@yourserver root]# su - service0
        -            [service0@yourserver service0]$ cd /var/lib/aolserver
        -            [service0@yourserver aolserver]$ tar xjf /tmp/service0-backup.tar.bz2
        -            [service0@yourserver aolserver]$ chmod -R 775 service0
        -            [service0@yourserver aolserver]$ chown -R service0.web service0
        +            guide.  Recreate the service user (service0).

      3. Restore the OpenACS files and database backup file.

        [root root]# su - service0
        +            [service0 service0]$ cd /var/lib/aolserver
        +            [service0 aolserver]$ tar xjf /tmp/service0-backup.tar.bz2
        +            [service0 aolserver]$ chmod -R 775 service0
        +            [service0 aolserver]$ chown -R service0.web service0
         
                     
      4. Restore the database

        • Oracle.�

          1. Set up a clean Oracle database user and - tablespace (more information).

          2. Invoke the import command

            imp service0/service0 FILE=/var/lib/aolserver/service0/database-backup/nighty_backup.dmp
        • Postgres.�

          Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. To compensate, we pre-creating some critical items first, which leads to some harmless errors.

          [root@yourserver root]# su - postgres
          -                [postgres@yourserver pgsql]$ createuser service0
          +                    tablespace with the same names as the ones exported from (more information).

        • Invoke the import command

          imp service0/service0 FILE=/var/lib/aolserver/service0/database-backup/nighty_backup.dmp FULL=Y
    3. Postgres.�

      Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. To compensate, we pre-creating some critical items first, which leads to some harmless errors.

      [root root]# su - postgres
      +                [postgres pgsql]$ createuser service0
                       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
      -                [service0@yourserver web]$ createdb service0
      +                [service0 web]$ createdb service0
                       CREATE DATABASE
      -                [service0@yourserver web]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
      +                [service0 web]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
                       (many lines omitted)
      -                [service0@yourserver web]$ psql service0 < /var/lib/aolserver/service0/database-backup/database-backup.dmp
      +                [service0 web]$ psql service0 < /var/lib/aolserver/service0/database-backup/database-backup.dmp
                       (many lines omitted)
      -                [service0@yourserver web]$ exit
      -                [postgres@yourserver pgsql]$ exit
      +                [service0 web]$ exit
      +                [postgres pgsql]$ exit
                       logout
      -                
  • Activate the service

    [root@yourserver root]# ln -s /var/lib/aolserver/service0/etc/daemontools /service/service0
    -            [root@yourserver root]# sleep 10
    -            [root@yourserver root]# svgroup web /service/service0
    -            [root@yourserver root]#
  • Automated Backup (OPTIONAL)

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

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

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

    3. +

  • Activate the service

    [root root]# ln -s /var/lib/aolserver/service0/etc/daemontools /service/service0
    +            [root root]# sleep 10
    +            [root root]# svgroup web /service/service0
    +            [root root]#
  • Automated Backup (OPTIONAL)

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

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

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

    3. Make sure the file is executable:

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

      30 1 * * * *        sh /var/lib/aolserver/service0/etc/backup.sh

    Using CVS for backup-recovery

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

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

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

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

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

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

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

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

    [root root]# su - service0
    +    [service0 service0]$ cd /var/lib/aolserver/service0
    +    [service0 service0]$ cvs up -r current
    +    [service0 service0]$ exit
    +    su - service0
         cd /var/lib/aolserver/service0
    -    cvs up -r current
    ($Id$)
    View comments on this page at openacs.org
    + cvs up -r current
    ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/complete-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/complete-install.html,v diff -u -r1.4.2.2 -r1.4.2.3 --- openacs-4/packages/acs-core-docs/www/complete-install.html 8 Dec 2003 15:41:16 -0000 1.4.2.2 +++ openacs-4/packages/acs-core-docs/www/complete-install.html 15 Dec 2003 15:03:46 -0000 1.4.2.3 @@ -1 +1 @@ -Chapter�3.�Complete Installation

    Chapter�3.�Complete Installation

    Table of Contents

    Install Unix-like system and supporting software
    Install Oracle 8.1.7
    Install PostgreSQL
    Install AOLserver 3.3oacs1
    Install OpenACS 5.0.0b4
    OpenACS Installation Guide for Windows2000
    OpenACS Installation Guide for Mac OS X
    View comments on this page at openacs.org
    +Chapter�3.�Complete Installation

    Chapter�3.�Complete Installation

    Table of Contents

    Install a Unix-like system and supporting software
    Install Oracle 8.1.7
    Install PostgreSQL
    Install AOLserver 3.3oacs1
    Install AOLserver 4
    Install OpenACS 5.0.0b4
    OpenACS Installation Guide for Windows2000
    OpenACS Installation Guide for Mac OS X
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/cvs-tips.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-tips.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 8 Dec 2003 15:41:16 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 15 Dec 2003 15:03:46 -0000 1.6.2.3 @@ -1,19 +1,19 @@ Appendix�D.�Using CVS with an OpenACS Site

    Appendix�D.�Using CVS with an OpenACS Site

    By Joel Aufrecht

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

    Add the Service to CVS - OPTIONAL.� +

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

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

      [root@yourserver root]# mkdir /cvsroot/service0
      -[root@yourserver root]# chown service0.web /cvsroot/service0
      -[root@yourserver root]#
      -
      mkdir /cvsroot/service0
      -chown service0.web /cvsroot/service0
    2. Add the repository location to the user environment.

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

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

      export CVSROOT=/cvsroot
      [service0@yourserver service0]$ exit
      +     

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

        [root root]# mkdir /cvsroot/service0
        +[root root]# chown service0.web /cvsroot/service0
        +[root root]#
        +mkdir /cvsroot/service0
        +chown service0.web /cvsroot/service0
      2. Add the repository location to the user environment.

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

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

        export CVSROOT=/cvsroot
        [service0 service0]$ exit
         logout
         
        -[root@yourserver root]#
      3. Import all files into cvs. In order to work on +[root root]#

    3. 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, @@ -24,32 +24,32 @@ /cvsroot/service0. "OpenACS" is the vendor tag, and "openacs-5-0-0b4" is the release tag. These tags will be useful in upgrading and - branching. -m sets the version comment.

      [root@yourserver root]# su - service0
      -[service0@yourserver service0]$ cd /web/service0
      -[service0@yourserver service0]$ cvs import -m "initial install" service0 OpenACS openacs-5-0-0b4
      +            branching.  -m sets the version comment.

      [root root]# su - service0
      +[service0 service0]$ cd /web/service0
      +[service0 service0]$ cvs import -m "initial install" service0 OpenACS openacs-5-0-0b4
       N service0/license.txt
       N service0/readme.txt
       (many lines omitted)
       N service0/www/SYSTEM/flush-memoized-statement.tcl
       
       No conflicts created by this import
       
      -[service0@yourserver service0]$
      -
      su - service0
      +[service0 service0]$
      +su - service0
       cd /web/service0
      -cvs import -m "initial install" service0 OpenACS openacs-5-0-0b4

      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.

      [service0@yourserver service0]$ cd ..
      -[service0@yourserver web]$ mv service0 service0.orig
      -[service0@yourserver web]$ cvs checkout service0
      +cvs import -m "initial install" service0 OpenACS openacs-5-0-0b4

      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.

      [service0 service0]$ cd ..
      +[service0 web]$ mv service0 service0.orig
      +[service0 web]$ cvs checkout service0
       cvs checkout: Updating service0
       U service0/license.txt
       (many lines omitted)
       U service0/www/SYSTEM/dbtest.tcl
       U service0/www/SYSTEM/flush-memoized-statement.tcl
      -[service0@yourserver web]$ exit
      +[service0 web]$ exit
       logout
       
      -[root@yourserver web]#
      -
      cd ..
      +[root web]#
      +cd ..
       mv service0 service0.orig
       cvs checkout service0
      -exit
    View comments on this page at openacs.org
    +exit
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/database-management.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/database-management.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/database-management.html 8 Dec 2003 15:41:16 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/database-management.html 15 Dec 2003 15:03:46 -0000 1.14.2.4 @@ -37,7 +37,7 @@ reread the inittab with /sbin/init q, and then restart-aolserver service0.

    Then, to drop the db, just do:

    -service0:~$ dropdb service0
    +[service0 ~]$ dropdb service0
     DROP DATABASE

    Vacuum Postgres nightly

    The "vacuum" command must be run periodically to reclaim space. The "vacuum analyze" form additionally collects statistics on the @@ -52,6 +52,6 @@ the key to good system management. So, if you're using the export procedure described above, you don't need to do this extra step.

    Edit your crontab:

    -joeuser:~$ crontab -e

    We'll set vacuum up to run nightly at 1 AM. Add the following +[joeuser ~]$ crontab -e

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

     0 1 * * * /usr/local/pgsql/bin/vacuumdb birdnotes
    ($Id$)
    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.23.2.3 -r1.23.2.4 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 8 Dec 2003 15:41:16 -0000 1.23.2.3 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 15 Dec 2003 15:03:47 -0000 1.23.2.4 @@ -36,7 +36,7 @@ In order to separate content and presentation, all OpenACS documentation will be marked up to conform to the DocBook XML DTD - + This enables us to publish in a variety of formats and relieves each contributor of the burden of presentation, freeing him to focus on content and sharing knowledge. @@ -57,7 +57,7 @@ list of elements and use more exotic features in your documents. The list is made up of SGML-elements but basically the same elements are valid in the XML DTD as long as you remember to: - +

    Headlines, Sections

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

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

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

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

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

    Code

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

    Links

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

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

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

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

    Put this in your XML:

    +	  

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

    Put this in your XML:

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

    And the output is:

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

    2. Linking outside the documentation

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

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

    Lists

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

    1. How to make an <ul>

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

    Tables

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

    Emphasis

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

    Index: openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html,v diff -u -r1.11.2.3 -r1.11.2.4 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 8 Dec 2003 15:41:17 -0000 1.11.2.3 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 15 Dec 2003 15:03:47 -0000 1.11.2.4 @@ -1,4 +1,4 @@ -External Authentication Requirements

    External Authentication Requirements

    Vision

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

    External Authentication Requirements

    Vision

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

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

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

  • Conceptual Pictures

    Authentication:

    -

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

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

    Login

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

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

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

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

    Login

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

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

    Each user in OpenACS will belong to exactly one authority, which can either be the "local" OpenACS users table, in which case the Index: openacs-4/packages/acs-core-docs/www/form-builder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/form-builder.html,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-core-docs/www/form-builder.html 8 Dec 2003 16:35:08 -0000 1.1.2.1 +++ openacs-4/packages/acs-core-docs/www/form-builder.html 15 Dec 2003 15:03:47 -0000 1.1.2.2 @@ -1,4 +1,4 @@ -Using HTML Forms

    Using HTML Forms

    Overview

    Multi-part Elements

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

    SELECT elements

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

      set foo_options [db_list_of_lists foo_option_list "
      +Using HTML Forms

      Using HTML Forms

      Overview

      Multi-part Elements

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

      SELECT elements

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

        set foo_options [db_list_of_lists foo_option_list "
             select foo,
                    foo_id
               from foos
        Index: openacs-4/packages/acs-core-docs/www/i18n.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n.html,v
        diff -u -r1.13.2.3 -r1.13.2.4
        --- openacs-4/packages/acs-core-docs/www/i18n.html	8 Dec 2003 15:41:17 -0000	1.13.2.3
        +++ openacs-4/packages/acs-core-docs/www/i18n.html	15 Dec 2003 15:03:47 -0000	1.13.2.4
        @@ -28,7 +28,17 @@
               database must use internationalized functions.  All displayed
               dates must use internationalized functions.  All displayed
               numbers must use internationalized functions.
        -

      Using the Message Catalog

      +

      AOLserver Configuration for Multilingual Sites

      + For multilingual websites we recommend using the UTF8 + charset. In order for AOLserver to use utf8 you need to set + the config parameters OutputCharset and + URLCharset to utf-8 in your AOLserver config file (use the etc/config.tcl + template file). For sites running on Oracle you need to make + sure that AOLserver is running with the NLS_LANG environment + variable set to .UTF8. You should set this variable in the + nsd-oracle run script (use the + acs-core-docs/www/files/nds-oracle.txt template file). +

      Using the Message Catalog

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

      Separate Templates for each Locale

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

      Message Keys in Template Files (ADP Files)

      +

      Separate Templates for each Locale

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

      Message Keys in Template Files (ADP Files)

      Internationalizing templates is about replacing human readable text in a certain language with internal message keys, which can then be dynamically replaced with real human language in @@ -151,7 +161,7 @@ Use the *_pretty version in your ADP page.

    To internationalize numbers, use lc_numeric $value, which formats the number using the appropriate decimal point and thousand separator for the locale. -

    Internationalizing Forms

    When coding forms, remember to use message keys for each piece of text that is user-visible, including form option labels and button labels.

    Internationalizing Existing Packages

    Internationalize Message text in ADP and TCL

    Acs-lang includes tools to automate some +

    Internationalizing Forms

    When coding forms, remember to use message keys for each piece of text that is user-visible, including form option labels and button labels.

    Internationalizing Existing Packages

    Internationalize Message text in ADP and TCL

    Acs-lang includes tools to automate some internationalization. From /acs-admin/apm/, select a package and then click on @@ -240,9 +250,9 @@ with the appropriate notation for the type of file, and store the text in the message catalog. You need to run the process twice, once for ADP files, and once for Tcl files. -

    Internationalize Package Parameters with visible messages

    +

    Internationalize Package Parameters with visible messages

    See Multilingual APM Parameters -

    Internationalize Date and Time queries

    1. Find datetime in .xql files. Use command line tools to find suspect SQL code:

      grep -r "to_char.*H" *
      +    

    Internationalize Date and Time queries

    1. Find datetime in .xql files. Use command line tools to find suspect SQL code:

      grep -r "to_char.*H" *
       grep -r "to_date.*H" *
       
    2. In SQL statements, replace the format string with the ANSI standard format, YYYY-MM-DD HH24:MI:SS and change the field name to *_ansi so that it cannot be confused with previous, improperly formatting fields. For example,

      to_char(timestamp,'MM/DD/YYYY HH:MI:SS') as foo_date_pretty

      becomes

      to_char(timestamp,'YYYY-MM-DD HH24:MI:SS') as foo_date_ansi
    3. In TCL files where the date fields are used, convert the datetime from local server timezone, which is how it's stored in the database, to the user's timezone for display. Do this with the localizing function lc_time_system_to_conn:

       set foo_date_ansi [lc_time_system_to_conn $foo_date_ansi]

      When a datetime will be written to the database, first convert it from the user's local time to the server's timezone with lc_time_conn_to_system. 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.22.2.3 -r1.22.2.4 --- openacs-4/packages/acs-core-docs/www/index.html 8 Dec 2003 15:41:17 -0000 1.22.2.3 +++ openacs-4/packages/acs-core-docs/www/index.html 15 Dec 2003 15:03:47 -0000 1.22.2.4 @@ -1 +1 @@ -OpenACS Core Documentation

      OpenACS Core Documentation


      Table of Contents

      I. OpenACS For Everyone
      1. High level information: What is OpenACS?
      Overview
      OpenACS Release Notes
      II. Administrator's Guide
      2. Installation Overview
      Basic Steps
      Prerequisite Software
      3. Complete Installation
      Install Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostgreSQL
      Install AOLserver 3.3oacs1
      Install OpenACS 5.0.0b4
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a New Service
      5. Upgrading
      Upgrading
      6. Maintenance
      Hosting Web Sites
      Database Management
      Backup and Recovery
      A. Install Red Hat 8/9
      B. Install additional supporting software
      Unpack the OpenACS tarball
      Initialize CVS (OPTIONAL)
      Add PSGML commands to emacs init file (OPTIONAL)
      Install Daemontools (OPTIONAL)
      Install qmail (OPTIONAL)
      Install Analog web file analyzer
      Install nspam
      Install Full Text Search
      Install nsopenssl
      Install tclwebtest.
      C. Credits
      Where did this document come from?
      Linux Install Guides
      Security Information
      Resources
      III. For OpenACS Package Developers
      7. Development Tutorial
      Creating a Package
      Setting Up Database Objects
      Creating Web Pages
      Debugging and Automated Testing
      Advanced Topics
      8. Development Reference
      OpenACS Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS
      Groups, Context, Permissions
      Writing OpenACS Application Pages
      Parties in OpenACS
      OpenACS Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      Using HTML Forms
      9. Engineering Standards
      OpenACS Style Guide
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      Variables
      Automated Testing
      10. Documentation Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Using nXML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      D. Using CVS with an OpenACS Site
      E. How to package and release OpenACS
      IV. For OpenACS Platform Developers
      11. Kernel Documentation
      Overview
      Object Model Requirements
      Object Model Design
      Permissions Requirements
      Permissions Design
      Groups Requirements
      Groups Design
      Subsites Requirements
      Subsites Design Document
      Package Manager Requirements
      Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      Security Requirements
      Security Design
      Security Notes
      Request Processor Requirements
      Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements
      Index
      View comments on this page at openacs.org
      +OpenACS Core Documentation

      OpenACS Core Documentation


      Table of Contents

      I. OpenACS For Everyone
      1. High level information: What is OpenACS?
      Overview
      OpenACS Release Notes
      II. Administrator's Guide
      2. Installation Overview
      Basic Steps
      Prerequisite Software
      3. Complete Installation
      Install a Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostgreSQL
      Install AOLserver 3.3oacs1
      Install AOLserver 4
      Install OpenACS 5.0.0b4
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a New Service
      5. Upgrading
      Upgrading
      6. Maintenance
      Hosting Web Sites
      Database Management
      Backup and Recovery
      A. Install Red Hat 8/9
      B. Install additional supporting software
      Unpack the OpenACS tarball
      Initialize CVS (OPTIONAL)
      Add PSGML commands to emacs init file (OPTIONAL)
      Install Daemontools (OPTIONAL)
      Install qmail (OPTIONAL)
      Install Analog web file analyzer
      Install nspam
      Install Full Text Search
      Install nsopenssl
      Install tclwebtest.
      C. Credits
      Where did this document come from?
      Linux Install Guides
      Security Information
      Resources
      III. For OpenACS Package Developers
      7. Development Tutorial
      Creating a Package
      Setting Up Database Objects
      Creating Web Pages
      Debugging and Automated Testing
      Advanced Topics
      8. Development Reference
      OpenACS Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS
      Groups, Context, Permissions
      Writing OpenACS Application Pages
      Parties in OpenACS
      OpenACS Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      Using HTML Forms
      9. Engineering Standards
      OpenACS Style Guide
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      Variables
      Automated Testing
      10. Documentation Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Using nXML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      D. Using CVS with an OpenACS Site
      E. How to package and release OpenACS
      IV. For OpenACS Platform Developers
      11. Kernel Documentation
      Overview
      Object Model Requirements
      Object Model Design
      Permissions Requirements
      Permissions Design
      Groups Requirements
      Groups Design
      Subsites Requirements
      Subsites Design Document
      Package Manager Requirements
      Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      Security Requirements
      Security Design
      Security Notes
      Request Processor Requirements
      Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements
      Index
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/install-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-cvs.html,v diff -u -r1.12.2.3 -r1.12.2.4 --- openacs-4/packages/acs-core-docs/www/install-cvs.html 8 Dec 2003 15:41:17 -0000 1.12.2.3 +++ openacs-4/packages/acs-core-docs/www/install-cvs.html 15 Dec 2003 15:03:47 -0000 1.12.2.4 @@ -1,6 +1,6 @@ -Initialize CVS (OPTIONAL)

      Initialize CVS (OPTIONAL)

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

      [root@yourserver tmp]# mkdir /cvsroot
      -[root@yourserver tmp]# cvs -d /cvsroot init
      -[root@yourserver tmp]#
      -
      mkdir /cvsroot
      -cvs -d /cvsroot init
      View comments on this page at openacs.org
      +Initialize CVS (OPTIONAL)

      Initialize CVS (OPTIONAL)

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

      [root tmp]# mkdir /cvsroot
      +[root tmp]# cvs -d /cvsroot init
      +[root tmp]#
      +mkdir /cvsroot
      +cvs -d /cvsroot init
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/install-daemontools.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-daemontools.html,v diff -u -r1.13.2.3 -r1.13.2.4 --- openacs-4/packages/acs-core-docs/www/install-daemontools.html 8 Dec 2003 15:41:17 -0000 1.13.2.3 +++ openacs-4/packages/acs-core-docs/www/install-daemontools.html 15 Dec 2003 15:03:47 -0000 1.13.2.4 @@ -3,31 +3,31 @@ installed in /package. These commands install daemontools and svgroup. svgroup is a script for granting permissions, to allow users other than root to use daemontools for specific - services.

      1. Install Daemontools

        download daemontools and install it.

        • Red Hat 8

          [root@yourserver root]# mkdir -p /package
          -[root@yourserver root]# chmod 1755 /package/
          -[root@yourserver root]# cd /package/
          -[root@yourserver package]# tar xzf /tmp/daemontools-0.76.tar.gz
          -[root@yourserver package]# cd admin/daemontools-0.76/
          -[root@yourserver daemontools-0.76]# package/install
          +      services.

          1. Install Daemontools

            download daemontools and install it.

            • Red Hat 8

              [root root]# mkdir -p /package
              +[root root]# chmod 1755 /package/
              +[root root]# cd /package/
              +[root package]# tar xzf /tmp/daemontools-0.76.tar.gz
              +[root package]# cd admin/daemontools-0.76/
              +[root daemontools-0.76]# package/install
               Linking ./src/* into ./compile...
               
               Creating /service...
               Adding svscanboot to inittab...
               init should start svscan now.
              -[root@yourserver root]#
              -
              mkdir -p /package 
              +[root root]#
              +mkdir -p /package 
               chmod 1755 /package 
               cd /package 
               tar xzf /tmp/daemontools-0.76.tar.gz 
               cd admin/daemontools-0.76 
              -package/install
            • Red Hat 9

              Make sure you have the source tarball in +package/install

        • Red Hat 9

          Make sure you have the source tarball in /tmp, or download it. -

          [root@yourserver root]# mkdir -p /package
          -[root@yourserver root]# chmod 1755 /package/
          -[root@yourserver root]# cd /package/
          -[root@yourserver package]# tar xzf /tmp/daemontools-0.76.tar.gz
          -[root@yourserver package]# cd admin
          -[root@yourserver admin]# wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
          +

          [root root]# mkdir -p /package
          +[root root]# chmod 1755 /package/
          +[root root]# cd /package/
          +[root package]# tar xzf /tmp/daemontools-0.76.tar.gz
          +[root package]# cd admin
          +[root admin]# wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
           --14:19:24--  http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
                      => `daemontools-0.76.errno.patch'
           Resolving moni.csi.hu... done.
          @@ -39,29 +39,29 @@
           
           14:19:24 (346.68 KB/s) - `daemontools-0.76.errno.patch' saved [355/355]
           
          -[root@yourserver admin]# cd daemontools-0.76
          -[root@yourserver daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch
          -[root@yourserver daemontools-0.76]# package/install
          +[root admin]# cd daemontools-0.76
          +[root daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch
          +[root daemontools-0.76]# package/install
           Linking ./src/* into ./compile...(many lines omitted)
           Creating /service...
           Adding svscanboot to inittab...
           init should start svscan now.
          -[root@yourserver root]#
          -
          mkdir -p /package 
          +[root root]#
          +mkdir -p /package 
           chmod 1755 /package 
           cd /package 
           tar xzf /tmp/daemontools-0.76.tar.gz 
           cd admin
           wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
           cd daemontools-0.76
           patch -p1 < ../daemontools-0.76.errno.patch
          -package/install
        • Debian

          root:~# apt-get install daemontools-installer
          -root:~# build-daemontools
      2. Verify that svscan is running. If it is, you should see - these two processes running:

        [root@yourserver root]# ps -auxw | grep service
        +package/install
      3. Debian

        [root ~]# apt-get install daemontools-installer
        +[root ~]# build-daemontools
    4. Verify that svscan is running. If it is, you should see + these two processes running:

      [root root]# ps -auxw | grep service
       root     13294  0.0  0.1  1352  272 ?        S    09:51   0:00 svscan /service
       root     13295  0.0  0.0  1304  208 ?        S    09:51   0:00 readproctitle service errors: .......................................
      -[root@yourserver root]#
    5. Install a script to grant non-root users permission to - control daemontools services.

      [root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
      -[root@yourserver root]# chmod 755 /usr/local/bin/svgroup
      -
      cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup 
      -chmod 755 /usr/local/bin/svgroup
    View comments on this page at openacs.org
    +[root root]#
  • Install a script to grant non-root users permission to + control daemontools services.

    [root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
    +[root root]# chmod 755 /usr/local/bin/svgroup
    +cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup 
    +chmod 755 /usr/local/bin/svgroup
  • View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-full-text-search.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/install-full-text-search.html,v diff -u -r1.11.2.3 -r1.11.2.4 --- openacs-4/packages/acs-core-docs/www/install-full-text-search.html 8 Dec 2003 15:41:17 -0000 1.11.2.3 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search.html 15 Dec 2003 15:03:47 -0000 1.11.2.4 @@ -1,95 +1,95 @@ -Install Full Text Search

    Install Full Text Search

    Install OpenFTS module

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

    Install Full Text Search

    Install OpenFTS module

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

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

      [root@yourserver root]# su - postgres
      -[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.4/contrib/tsearch/
      -[postgres@yourserver tsearch]$ make
      +	  OpenFTS requires.

      [root root]# su - postgres
      +[postgres pgsql]$ cd /usr/local/src/postgresql-7.2.4/contrib/tsearch/
      +[postgres 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
      +[postgres 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
      +[postgres tsearch]$ exit
       logout
       
      -[root@yourserver root]#
      -
      su - postgres
      +[root root]#
      +su - postgres
       cd /usr/local/src/postgresql-7.2.4/contrib/tsearch
       make
       make install
      -exit
    2. 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/
      +exit
    3. Unpack the OpenFTS tarball and compile and install + the driver.

      [root root]# cd /usr/local/src
      +[root src]# tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
      +[root src]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
      +[root 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
      +[root 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
      +[root Search-OpenFTS-tcl-0.3.2]# cd aolserver
      +[root 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 
      +[root aolserver]# cp nsfts.so /usr/local/aolserver/bin/
      +[root 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
      -
    4. Build some supplemental modules.

      [root@yourserver aolserver]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
      -[root@yourserver Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.4/contrib
      -[root@yourserver Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts
      -[root@yourserver pgsql_contrib_openfts]# make
      +
    5. Build some supplemental modules.

      [root aolserver]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
      +[root Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.4/contrib
      +[root Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts
      +[root 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
      +[root pgsql_contrib_openfts]# su postgres
      +[postgres 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 /usr/local/src/Search-OpenFTS-tcl-0.3.2
      +[postgres pgsql_contrib_openfts]$ exit
      +[root pgsql_contrib_openfts]#
      +cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
       cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.4/contrib
       cd /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts
       make
       su postgres
       make install
      -exit

    Install OpenFTS prerequisites in PostgreSQL instance

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

    Install OpenFTS prerequisites in PostgreSQL instance

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

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

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

    Enable OpenFTS in config.tcl

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

    #ns_param   nsfts           ${bindir}/nsfts.so

    Install Full Text Search Engine

    1. Click 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 checkbox next to OpenFTS Driver 4.2. Then click Next.

    4. Click Install Packages

    5. Restart the service.

      [service0@yourserver service0]$ svc -t /service/service0
      -[service0@yourserver service0]$
    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 +[service0 service0]$ +/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql +/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts/openfts.sql

      Enable OpenFTS in config.tcl

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

      #ns_param   nsfts           ${bindir}/nsfts.so

      Install Full Text Search Engine

      1. Click 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 checkbox next to OpenFTS Driver 4.2. Then click Next.

      4. Click Install Packages

      5. Restart the service.

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

      7. Click on 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 @@ -103,13 +103,13 @@ search from the drop-down list, and click New. -

      10. Restart the service.

        [service0@yourserver service0]$ svc -t /service/service0
        -[service0@yourserver service0]$
      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. +

    9. Restart the service.

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

    11. 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.

    12. 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. -

    13. Restart the service.

      [service0@yourserver service0]$ svc -t /service/service0
      -[service0@yourserver service0]$
    14. Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.

    View comments on this page at openacs.org
    +

  • Restart the service.

    [service0 service0]$ svc -t /service/service0
    +[service0 service0]$
  • Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.

  • View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-nsopenssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-nsopenssl.html,v diff -u -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 8 Dec 2003 15:41:17 -0000 1.7.2.2 +++ openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 15 Dec 2003 15:03:47 -0000 1.7.2.3 @@ -7,28 +7,28 @@ /usr/local/src/aolserver and the nsopenssl tarball in /tmp.

    Red Hat 9 note: see this - thread for details on compiling nsopenssl.)

    [root@yourserver bin]# cd /usr/local/src/aolserver
    -[root@yourserver aolserver]# wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
    -[root@yourserver aolserver]# tar xzf nsopenssl-2.1.tar.gz 
    -[root@yourserver aolserver]# cd nsopenssl-2.1
    -[root@yourserver nsopenssl-2.1]# make OPENSSL=/usr/local/ssl
    +          thread for details on compiling nsopenssl.)

    [root bin]# cd /usr/local/src/aolserver
    +[root aolserver]# wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
    +[root aolserver]# tar xzf nsopenssl-2.1.tar.gz 
    +[root aolserver]# cd nsopenssl-2.1
    +[root 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
    +[root nsopenssl-2.1]# cp nsopenssl.so /usr/local/aolserver/bin
    +[root nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/
    +[root nsopenssl-2.1]#
    +cd /usr/local/src/aolserver
     wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
     tar xzf 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/

    For Debian (more - information):

    apt-get install libssl-dev
    +cp https.tcl /usr/local/aolserver/modules/tcl/

    For Debian (more + information):

    apt-get install libssl-dev
     cd /usr/local/src/aolserver
     tar xzf /tmp/nsopenssl-2.1.tar.gz
     cd nsopenssl-2.1
     make OPENSSL=/usr/lib/ssl
     cp nsopenssl.so /usr/local/aolserver/bin
    -cp https.tcl /usr/local/aolserver/modules/tcl/
    View comments on this page at openacs.org
    +cp https.tcl /usr/local/aolserver/modules/tcl/
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-qmail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-qmail.html,v diff -u -r1.13.2.3 -r1.13.2.4 --- openacs-4/packages/acs-core-docs/www/install-qmail.html 8 Dec 2003 15:41:17 -0000 1.13.2.3 +++ openacs-4/packages/acs-core-docs/www/install-qmail.html 15 Dec 2003 15:03:47 -0000 1.13.2.4 @@ -3,33 +3,33 @@ send and receive mail, and you don't want to use an alternate MTA.

    Red Hat 9: all djb tools (qmail, daemontools, ucspi) will fail to compile in Red Hat 9 because of changes to glibc (patches)

    1. Install ucspi.�This program handles incoming tcp connections. - Download ucspi and install it.

      [root@yourserver root]# cd /usr/local/src
      -[root@yourserver src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
      -[root@yourserver src]# tar xzf ucspi-tcp-0.88.tar.gz
      -
      cd /usr/local/src 
      +            Download ucspi and install it.

      [root root]# cd /usr/local/src
      +[root src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
      +[root src]# tar xzf ucspi-tcp-0.88.tar.gz
      +cd /usr/local/src 
       wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
      -tar xzf ucspi-tcp-0.88.tar.gz 

      Red Hat 9 only

      wget http://moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
      +tar xzf ucspi-tcp-0.88.tar.gz 

      Red Hat 9 only

      wget http://moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
       cd ucspi-tcp-0.88
       patch -p1 <../ucspi-tcp-0.88.errno.patch
      -cd ..

      All platforms continue:

      [root@yourserver src]# cd ucspi-tcp-0.88
      -[root@yourserver ucspi-tcp-0.88]# make
      +cd ..

      All platforms continue:

      [root src]# cd ucspi-tcp-0.88
      +[root ucspi-tcp-0.88]# make
       ( cat warn-auto.sh; \
       echo 'main="$1"; shift'; \(many lines omitted)
       ./compile instcheck.c
       ./load instcheck hier.o auto_home.o unix.a byte.a
      -[root@yourserver ucspi-tcp-0.88]# make setup check
      +[root ucspi-tcp-0.88]# make setup check
       ./install
       ./instcheck
      -[root@yourserver ucspi-tcp-0.88]#
      -
      
      +[root ucspi-tcp-0.88]#
      +
       cd ucspi-tcp-0.88 
       make 
      -make setup check

      Verify that ucspi-tcp was installed successfully by -running the tcpserver program which is part of ucspi-tcp:

      [root@yourserver ucspi-tcp-0.88]# tcpserver
      +make setup check

      Verify that ucspi-tcp was installed successfully by +running the tcpserver program which is part of ucspi-tcp:

      [root ucspi-tcp-0.88]# tcpserver
       tcpserver: usage: tcpserver [ -1UXpPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid
       ] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program
      -[root@yourserver ucspi-tcp-0.88]#
      -

      +[root ucspi-tcp-0.88]# +

      (I'm not sure if this next step is 100% necessary, but when I skip it I get problems. If you get the error 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) then you need to do this.) AOLserver sends outgoing mail via the ns_sendmail command, which pipes a command to the sendmail executable. Or, in our @@ -40,13 +40,13 @@ Unless this mail is addressed to the same machine, qmail thinks that it's an attempt to relay mail, and rejects it. So these two commands set up an exception so that any mail sent from 127.0.0.1 is allowed to -send outgoing mail.

      [root@yourserver ucspi-tcp-0.88]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
      -[root@yourserver ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
      -
      cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp 
      -tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 
    2. Install Qmail.�

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

      [root@yourserver root]# cd /usr/local/src
      -[root@yourserver src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
      -[root@yourserver src]# tar xzf netqmail-1.04.tar.gz
      +send outgoing mail.

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

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

      [root root]# cd /usr/local/src
      +[root src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
      +[root src]# tar xzf netqmail-1.04.tar.gz
       --15:04:11--  http://www.qmail.org/netqmail-1.04.tar.gz
                  => `netqmail-1.04.tar.gz'
       Resolving www.qmail.org... done.
      @@ -58,18 +58,18 @@
       
       15:04:21 (24.04 KB/s) - `netqmail-1.04.tar.gz' saved [242310/242310]
       
      -[root@yourserver src]# mkdir /var/qmail
      -[root@yourserver src]# groupadd nofiles
      -[root@yourserver src]# useradd -g nofiles -d /var/qmail/alias alias
      -[root@yourserver src]# useradd -g nofiles -d /var/qmail qmaild
      -[root@yourserver src]# useradd -g nofiles -d /var/qmail qmaill
      -[root@yourserver src]# useradd -g nofiles -d /var/qmail qmailp
      -[root@yourserver src]# groupadd qmail
      -[root@yourserver src]# useradd -g qmail -d /var/qmail qmailq
      -[root@yourserver src]# useradd -g qmail -d /var/qmail qmailr
      -[root@yourserver src]# useradd -g qmail -d /var/qmail qmails
      -[root@yourserver src]# cd netqmail-1.04
      -[root@yourserver netqmail-1.04]# ./collate.sh
      +[root src]# mkdir /var/qmail
      +[root src]# groupadd nofiles
      +[root src]# useradd -g nofiles -d /var/qmail/alias alias
      +[root src]# useradd -g nofiles -d /var/qmail qmaild
      +[root src]# useradd -g nofiles -d /var/qmail qmaill
      +[root src]# useradd -g nofiles -d /var/qmail qmailp
      +[root src]# groupadd qmail
      +[root src]# useradd -g qmail -d /var/qmail qmailq
      +[root src]# useradd -g qmail -d /var/qmail qmailr
      +[root src]# useradd -g qmail -d /var/qmail qmails
      +[root src]# cd netqmail-1.04
      +[root netqmail-1.04]# ./collate.sh
       
       You should see 7 lines of text below.  If you see anything
       else, then something might be wrong.
      @@ -80,13 +80,13 @@
       [5] Renaming qmail-1.03 to netqmail-1.04...
       [6] Continue installing qmail using the instructions found at:
       [7] http://www.lifewithqmail.org/lwq.html#installation
      -[root@yourserver netqmail-1.04]# cd netqmail-1.04
      -[root@yourserver netqmail-1.04]# make setup check
      +[root netqmail-1.04]# cd netqmail-1.04
      +[root netqmail-1.04]# make setup check
       ( cat warn-auto.sh; \
       echo CC=\'`head -1 conf-cc`\'; \(many lines omitted)
       ./install
       ./instcheck
      -
      cd /usr/local/src 
      +cd /usr/local/src 
       wget http://www.qmail.org/netqmail-1.04.tar.gz
       tar xzf netqmail-1.04.tar.gz
       mkdir /var/qmail 
      @@ -102,11 +102,11 @@
       cd netqmail-1.04
       ./collate.sh
       cd netqmail-1.04
      -make setup check

      Replace sendmail with qmail's wrapper.

      [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
      -[root@yourserver qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
      -[root@yourserver qmail-1.03]#
      -
      rm -f /usr/bin/sendmail /usr/sbin/sendmail
      -ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

      Configure qmail - specifically, run the config script to set up files in /var/qmail/control specifying the computer's identity and which addresses it should accept mail for. This command will automatically set up qmail correctly if you have correctly set a valid host nome. If not, you'll want to read /var/qmail/doc/INSTALL.ctl to find out how to configure qmail.

      [root@yourserver qmail-1.03]# ./config-fast yourserver.test
      +make setup check

      Replace sendmail with qmail's wrapper.

      [root qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
      +[root qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
      +[root qmail-1.03]#
      +rm -f /usr/bin/sendmail /usr/sbin/sendmail
      +ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

      Configure qmail - specifically, run the config script to set up files in /var/qmail/control specifying the computer's identity and which addresses it should accept mail for. This command will automatically set up qmail correctly if you have correctly set a valid host nome. If not, you'll want to read /var/qmail/doc/INSTALL.ctl to find out how to configure qmail.

      [root qmail-1.03]# ./config-fast yourserver.test
       Your fully qualified host name is yourserver.test.
       Putting yourserver.test into control/me...
       Putting yourserver.test into control/defaultdomain...
      @@ -115,47 +115,47 @@
       Putting yourserver.test into control/rcpthosts...
       Now qmail will refuse to accept SMTP messages except to yourserver.test.
       Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
      -[root@yourserver qmail-1.03]#
      -
      ./config-fast yourserver.test

      All incoming mail that isn't for a specific user is handled by the alias user. This includes all root mail. These commands prepare the alias user to receive mail.

      [root@yourserver qmail-1.03]# cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
      -[root@yourserver alias]# chmod 644 ~alias/.qmail*
      -[root@yourserver alias]# /var/qmail/bin/maildirmake ~alias/Maildir/
      -[root@yourserver alias]# chown -R alias.nofiles /var/qmail/alias/Maildir
      -[root@yourserver alias]#
      -
      cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root 
      +[root qmail-1.03]#
      +./config-fast yourserver.test

      All incoming mail that isn't for a specific user is handled by the alias user. This includes all root mail. These commands prepare the alias user to receive mail.

      [root qmail-1.03]# cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
      +[root alias]# chmod 644 ~alias/.qmail*
      +[root alias]# /var/qmail/bin/maildirmake ~alias/Maildir/
      +[root alias]# chown -R alias.nofiles /var/qmail/alias/Maildir
      +[root alias]#
      +cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root 
       chmod 644 ~alias/.qmail* 
       /var/qmail/bin/maildirmake ~alias/Maildir/ 
      -chown -R alias.nofiles /var/qmail/alias/Maildir

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

      [root@yourserver alias]# echo "./Maildir" > /var/qmail/bin/.qmail
      -[root@yourserver alias]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
      -[root@yourserver alias]# chmod 755 /var/qmail/rc
      -[root@yourserver alias]# 
      -
      echo "./Maildir" > /var/qmail/bin/.qmail 
      +chown -R alias.nofiles /var/qmail/alias/Maildir

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

      [root alias]# echo "./Maildir" > /var/qmail/bin/.qmail
      +[root alias]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
      +[root alias]# chmod 755 /var/qmail/rc
      +[root alias]# 
      +echo "./Maildir" > /var/qmail/bin/.qmail 
       cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc 
       chmod 755 /var/qmail/rc 
      -

      Set up the skeleton directory so that new users will - be configured for qmail.

      [root@yourserver root]# /var/qmail/bin/maildirmake /etc/skel/Maildir
      -[root@yourserver root]# echo "./Maildir/" > /etc/skel/.qmail
      -[root@yourserver root]# 
      -
      /var/qmail/bin/maildirmake /etc/skel/Maildir
      -echo "./Maildir/" > /etc/skel/.qmail

      As recommended, we will run qmail with daemontools - control files. Create daemontools control directories, set up a daemontools control script, copy the supervise control files, and set permissions. The last line links the control directories to /service, which will cause supervise to detect them and execute the run files, causing qmail to start.

      [root@yourserver root]# mkdir -p /var/qmail/supervise/qmail-send/log
      -[root@yourserver root]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
      -[root@yourserver root]# mkdir /var/log/qmail
      -[root@yourserver root]# chown qmaill /var/log/qmail
      -[root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
      -[root@yourserver root]# chmod 755 /var/qmail/bin/qmailctl
      -[root@yourserver root]# ln -s /var/qmail/bin/qmailctl /usr/bin
      -[root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run 
      -[root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
      -[root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
      -[root@yourserver root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
      -[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-send/run
      -[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-send/log/run
      -[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
      -[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
      -[root@yourserver root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
      -[root@yourserver root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
      -
      mkdir -p /var/qmail/supervise/qmail-send/log
      +

      Set up the skeleton directory so that new users will + be configured for qmail.

      [root root]# /var/qmail/bin/maildirmake /etc/skel/Maildir
      +[root root]# echo "./Maildir/" > /etc/skel/.qmail
      +[root root]# 
      +/var/qmail/bin/maildirmake /etc/skel/Maildir
      +echo "./Maildir/" > /etc/skel/.qmail

      As recommended, we will run qmail with daemontools + control files. Create daemontools control directories, set up a daemontools control script, copy the supervise control files, and set permissions. The last line links the control directories to /service, which will cause supervise to detect them and execute the run files, causing qmail to start.

      [root root]# mkdir -p /var/qmail/supervise/qmail-send/log
      +[root root]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
      +[root root]# mkdir /var/log/qmail
      +[root root]# chown qmaill /var/log/qmail
      +[root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
      +[root root]# chmod 755 /var/qmail/bin/qmailctl
      +[root root]# ln -s /var/qmail/bin/qmailctl /usr/bin
      +[root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run 
      +[root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
      +[root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
      +[root root]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
      +[root root]# chmod 755 /var/qmail/supervise/qmail-send/run
      +[root root]# chmod 755 /var/qmail/supervise/qmail-send/log/run
      +[root root]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
      +[root root]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
      +[root root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
      +[root root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
      +mkdir -p /var/qmail/supervise/qmail-send/log
       mkdir -p /var/qmail/supervise/qmail-smtpd/log
       mkdir /var/log/qmail
       chown qmaill /var/log/qmail
      @@ -171,11 +171,11 @@
       chmod 755 /var/qmail/supervise/qmail-smtpd/run
       chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
       ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
      -

      Wait ten seconds or so, and then verify that that the four qmail processes are running. If uptimes don't rise above 1 second, this may indicate broken scripts that are continuously restarting. In that case, start debugging by checking permissions.

      [root@yourserver root]# qmailctl stat
      +

      Wait ten seconds or so, and then verify that that the four qmail processes are running. If uptimes don't rise above 1 second, this may indicate broken scripts that are continuously restarting. In that case, start debugging by checking permissions.

      [root root]# qmailctl stat
       /service/qmail-send: up (pid 32700) 430 seconds
       /service/qmail-send/log: up (pid 32701) 430 seconds
       /service/qmail-smtpd: up (pid 32704) 430 seconds
       /service/qmail-smtpd/log: up (pid 32705) 430 seconds
       messages in queue: 0
       messages in queue but not yet preprocessed: 0
      -[root@yourserver root]#

      Further verify by sending and receiving email. Incoming mail for root is stored in /var/qmail/alias/Maildir.

    View comments on this page at openacs.org
    +[root root]#

    Further verify by sending and receiving email. Incoming mail for root is stored in /var/qmail/alias/Maildir.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-redhat.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-redhat.html,v diff -u -r1.13.2.3 -r1.13.2.4 --- openacs-4/packages/acs-core-docs/www/install-redhat.html 8 Dec 2003 15:41:17 -0000 1.13.2.3 +++ openacs-4/packages/acs-core-docs/www/install-redhat.html 15 Dec 2003 15:03:47 -0000 1.13.2.4 @@ -26,7 +26,7 @@

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

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

    3. Click Next on the boot loader screen

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

  • Click Next on the boot loader screen

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

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

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

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

  • Choose your time zone and click Next.

  • Type in a root password, twice.

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

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

    At the bottom, check Select Individual Packages and click Next

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

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

    At the bottom, check Select Individual Packages and click Next

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

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

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

  • After it finishes rebooting and shows the login prompt, log in:

    yourserver login: root
     Password:
    -[root@yourserver root]#
  • Install any security patches. For example, insert your CD with +[root root]#

  • Install any security patches. For example, insert your CD with patches, mount it with mount /dev/cdrom, then cd /mnt/cdrom, then rpm -UVH @@ -119,7 +119,7 @@ upgrading all of that. Since you are upgrading the kernel, reboot after this step.

  • Lock down SSH

    1. - + SSH is the protocol we use to connect securely to the computer (replacing telnet, which is insecure). sshd is the daemon that listens for incoming @@ -148,15 +148,15 @@ (The reason for this discrepencies is that, while daemontools is better, it's a pain in the ass to deal with and nobody's had any trouble leaving PostgreSQL the way it is.) -

      [root@yourserver root]# service pcmcia stop
      -[root@yourserver root]# service netfs stop
      -[root@yourserver root]# chkconfig --del pcmcia
      -[root@yourserver root]# chkconfig --del netfs
      -[root@yourserver root]#
      -
      service pcmcia stop
      +       

      [root root]# service pcmcia stop
      +[root root]# service netfs stop
      +[root root]# chkconfig --del pcmcia
      +[root root]# chkconfig --del netfs
      +[root root]#
      +service pcmcia stop
       service netfs stop
       chkconfig --del pcmcia
      -chkconfig --del netfs

      If you installed PostgreSQL, do also +chkconfig --del netfs

      If you installed PostgreSQL, do also service postgresql start and chkconfig --add postgresql.

    2. Plug in the network cable.

    3. Verify that you have connectivity by going to another computer and ssh'ing to yourserver, logging in as @@ -167,15 +167,15 @@ Warning: Permanently added 'yourserver.test (1.2.3.4)' (DSA) to the list of known hosts. Password: Last login: Mon Mar 3 21:15:27 2003 from host-12-01.dsl-sea.seanet.com -[remadmin@yourserver remadmin]$ su - +[remadmin remadmin]$ su - Password: -[root@yourserver root]#

    4. If you didn't burn a CD of patches and use it, can still +[root root]#

    5. If you didn't burn a CD of patches and use it, can still download and install the necessary patches. Here's how to do it for the kernel; you should also check for other critical packages.

      Upgrade the kernel to fix a security hole. The default Red Hat 8.0 system kernel (2.4.18-14, which you can check - with uname -a) has several security problems. Download the new kernel, install it, and reboot.

      [root@yourserver root]# cd /tmp
      -[root@yourserver tmp]# wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
      +          with uname -a) has several security problems.  Download the new kernel, install it, and reboot.

      [root root]# cd /tmp
      +[root tmp]# wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
       --20:39:00--  http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
                  => `kernel-2.4.18-27.7.x.i686.rpm'
       Resolving updates.redhat.com... done.
      @@ -191,13 +191,13 @@
       warning: kernel-2.4.18-27.7.x.i686.rpm: V3 DSA signature: NOKEY, key ID db42a60e
       Preparing...                ########################################### [100%]
          1:kernel                 ########################################### [100%]
      -[root@yourserver tmp]# reboot
      +[root tmp]# reboot
       
       Broadcast message from root (pts/0) (Sat May  3 20:46:39 2003):
       
       The system is going down for reboot NOW!
      -[root@yourserver tmp]#
      -
      cd /tmp
      +[root tmp]#
      +cd /tmp
       wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
       rpm -Uvh kernel-2.4.18-27.7.x.i686.rpm
      -reboot
    View comments on this page at openacs.org
    +reboot
  • View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-steps.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-steps.html,v diff -u -r1.6.2.3 -r1.6.2.4 --- openacs-4/packages/acs-core-docs/www/install-steps.html 8 Dec 2003 15:41:17 -0000 1.6.2.3 +++ openacs-4/packages/acs-core-docs/www/install-steps.html 15 Dec 2003 15:03:47 -0000 1.6.2.4 @@ -1,23 +1,21 @@ Basic Steps

    Basic Steps

    - The basic steps to getting OpenACS up and running are: -

    1. Install an OS (Linux, FreeBSD, OpenBSD, Appendix�A, Install Red Hat 8/9, the section called “OpenACS Installation Guide for Mac OS X”, the section called “OpenACS Installation Guide for Windows2000”).

    2. Install a database (Oracle or - PostgreSQL).

    3. Install the AOLserver webserver.

    4. Create a unique database and system user. + The basic steps for getting OpenACS installed are: +

      1. Install an OS and supporting software (see Install a Unix-like OS or Appendix�A, Install Red Hat 8/9 for more details).

      2. Install a database (see Install Oracle or + Install PostgreSQL).

      3. Install AOLserver (see Install AOLserver 3.3oacs1).

      4. Create a unique database and system user. Install the OpenACS tarball, start and AOLserver instance, and use the OpenACS web pages to complete installation - (Install OpenACS 5.0.0b4).

      Binaries and other shortcuts

      1. The patched version of AOLserver we use is not currently + (see Install OpenACS 5.0.0b4).

      There are specific instructions available for Mac OS X and + Windows2000 available (see the section called “OpenACS Installation Guide for Mac OS X” or + the section called “OpenACS Installation Guide for Windows2000” for those).

      Binaries and other shortcuts

      1. The patched version of AOLserver we use is not currently available in a precompiled binary.

      2. The packaged version of - PostgreSQL in Debian and Red Hat and FreeBSD ports works fine.

      3. Jonathan Marsden has created RPMs (at - http://www.xc.org) - for OpenACS 4.5 but there are not yet any for version - 5.0.0b4.

      4. An experimental script automates OpenACS checkout and + PostgreSQL in Debian and Red Hat and FreeBSD ports works fine.

      5. An experimental script automates the OpenACS checkout and installation. -

      Requirements

      +

    System Requirements

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

    +

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

    • 1GB free space on your hard drive (much more if you want Oracle)

    • A Unix-like operating system with Tcl, tDOM, and + a mail transport agent like sendmail or qmail. (see the section called “Prerequisite Software”)

    All of the software that you will need is free and open-source, except for Oracle. You can obtain a free copy of Oracle for development purposes. This is described in the Acquire Oracle section. @@ -30,21 +28,22 @@ 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 +}

  • 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
  • Paths and Users

    Figure�2.1.�Assumptions in this Chapter

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS serviceservice0
    OpenACS service accountservice0
    OpenACS database nameservice0
    Root of OpenACS service file tree/var/lib/aolserver/service0
    Location of source code tarballs for new software/tmp
    The OpenACS tarball contains some files which + which you can copy and paste. The command prompt varies by system; in the examples we use the form[nsadmin aolserver]$, where nsadmin is the current user and aolserver is the current directory. The root prompt is shown ending in # and all other prompts in $.

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

    Paths and Users

    Table�2.2.�Default directories for a standard install

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

    + files are located at:

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

    None of these locations are set in stone - they're simply the values that we've chosen. The values that you'll probably want to change, such as service name, are Index: openacs-4/packages/acs-core-docs/www/install-tclwebtest.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-tclwebtest.html,v diff -u -r1.3.2.2 -r1.3.2.3 --- openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 8 Dec 2003 15:41:17 -0000 1.3.2.2 +++ openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 15 Dec 2003 15:03:47 -0000 1.3.2.3 @@ -1,8 +1,8 @@ Install tclwebtest.

    Install tclwebtest.

    Download the tclwebtest source, unpack it, and put it an appropriate - place. As root:

    cd /tmp
    +      place.  As root:

    cd /tmp
     tar xvzf tclwebtest-0.3.tar.gz
     mv tclwebtest-0.3 /usr/local/
     ln -s /usr/local/tclwebtest-0.3 /usr/local/tclwebtest
     ln -s /usr/local/tclwebtest/tclwebtest /usr/local/bin
    -
    View comments on this page at openacs.org
    +
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/ix01.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ix01.html,v diff -u -r1.1.4.2 -r1.1.4.3 --- openacs-4/packages/acs-core-docs/www/ix01.html 8 Dec 2003 15:41:17 -0000 1.1.4.2 +++ openacs-4/packages/acs-core-docs/www/ix01.html 15 Dec 2003 15:03:47 -0000 1.1.4.3 @@ -1,2 +1,2 @@ -Index

    Index

    A

    AOLserver
    configuration, Install from tarball
    Automated tests, Write automated tests

    C

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

    D

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

    E

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

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

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

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Install from tarball

    Q

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

    T

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

    U

    ulink, Links
    Unicode
    in PostgreSQL, Install PostgreSQL
    upgrade
    OpenACS 4.5 to 4.6
    Linux/Unix, Upgrading 4.5 to 4.6

    X

    XML guidelines, Why DocBook?
    xref
    linkend, Links
    xreflabel, Headlines, Sections
    View comments on this page at openacs.org
    +Index

    Index

    A

    AOLserver
    configuration, Install from tarball
    Automated tests, Write automated tests

    C

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

    D

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

    E

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

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

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

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Install from tarball

    Q

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

    T

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

    U

    ulink, Links
    Unicode
    in PostgreSQL, Install PostgreSQL
    upgrade
    OpenACS 4.5 to 4.6
    Linux/Unix, Upgrading 4.5 to 4.6

    X

    XML guidelines, Why DocBook?
    xref
    linkend, Links
    xreflabel, Headlines, Sections
    View comments on this page at openacs.org
    Fisheye: Tag 1.1.2.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ld-id2890769.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1.2.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ld-id2913366.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/maintenance-web.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-web.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/maintenance-web.html 8 Dec 2003 15:41:17 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/maintenance-web.html 15 Dec 2003 15:03:47 -0000 1.14.2.4 @@ -8,14 +8,14 @@ creates additional files and directories to track status and log. A daemontools directory is included in the OpenACS tarball at - /var/lib/aolserver/service0/etc/daemontools. To use it, first ill any existing AOLserver instances. As root, link the daemontools directory into the /service directory. Daemontools' svscan process checks this directory every five seconds, and will quickly execute run.

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

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

    Verify that AOLserver is running.

    [root@yourserver root]# ps -auxw | grep nsd
    +[root root]# ln -s /var/lib/aolserver/service0/etc/daemontools/ /service/service0

    Verify that AOLserver is running.

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

    • +[root root]#

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

    • svc -d /service/service0 - Bring the server down @@ -43,12 +43,12 @@ this option. This does not take the server out of keepalive mode, so it should still bounce back up immediately.

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

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

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

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

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

    Most of this information comes from Tom Jackson's AOLserver+Daemontools @@ -89,25 +89,25 @@ have Perl installed and also a symbolic link to it in /usr/local/bin.

    -joeuser:~$ su - 
    +[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
  • +[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
    +[joeuser ~]$ killall nsd
     nsd: no process killed
    -joeuser:~$ /usr/local/aolserver/bin/nsd-postgres -t ~/var/lib/aolserver/birdnotes/nsd.tcl
    -joeuser:~$ restart-aolserver birdnotes
    +[joeuser ~]$ /usr/local/aolserver/bin/nsd-postgres -t ~/var/lib/aolserver/birdnotes/nsd.tcl
    +[joeuser ~]$ restart-aolserver birdnotes
     Killing 23727 
    -joeuser:~$ killall nsd
    +[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 @@ -118,9 +118,9 @@ script worked, login as root and open /etc/inittab for editing.

    -joeuser:~$ su -
    +[joeuser ~]$ su -
     Password: ************
    -root:~# emacs -nw /etc/inittab
  • +[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. @@ -133,13 +133,13 @@

  • Still as root, enter the following command to re-initialize /etc/inittab.

    -root:~# killall nsd    
    +[root ~]# killall nsd    
     nsd: no process killed
    -root:~# /sbin/init q
  • +[root ~]# /sbin/init q

  • See if it worked by running the restart-aolserver script again.

    -root:~# restart-aolserver birdnotes
    +[root ~]# restart-aolserver birdnotes
     Killing 23750
  • If processes were killed, congratulations, your server is now automated for startup and shutdown. @@ -179,24 +179,24 @@ adds support for the ssl encryption layer. To use it, you must install the software, create or purchase certificates, and configure your OpenACS instance to use it.

    1. Uncomment this line from config.tcl.

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

      [service0@yourserver etc]$ mkdir /var/lib/aolserver/service0/etc/certs
      -[service0@yourserver etc]$ chmod 700 /var/lib/aolserver/service0/etc/certs
      -[service0@yourserver etc]$ 
      -
      mkdir /var/lib/aolserver/service0/etc/certs
      -chmod 700 /var/lib/aolserver/service0/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.

      [service0@yourserver service0]$ cd /var/lib/aolserver/service0/etc/certs
      -[service0@yourserver certs]$ perl /usr/share/ssl/misc/CA -newcert
      +
    4. Prepare a certificate directory for the service.

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

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

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

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

      Certificate (and private key) is in newreq.pem
      -[service0@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
      +[service0 certs]$

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

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

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

      [service0@yourserver certs]$ cp newreq.pem certfile.pem
      -[root@yourserver misc]# emacs certfile.pem

      Strip out the section that looks like

      -----BEGIN RSA PRIVATE KEY-----
      +[service0 certs]$ 

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

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

      Strip out the section that looks like

      -----BEGIN RSA PRIVATE KEY-----
       Proc-Type: 4,ENCRYPTED
       DEK-Info: DES-EDE3-CBC,F3EDE7CA1B404997
       S/Sd2MYA0JVmQuIt5bYowXR1KYKDka1d3DUgtoVTiFepIRUrMkZlCli08mWVjE6T
      @@ -206,31 +206,31 @@
             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 /var/lib/aolserver/service0
        -[service0@yourserver service0]$ cp /var/lib/aolserver/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]$ 
        
        +      the OpenACS tarball.

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

        Edit +cp -r /usr/share/analog-5.31/images www/log/

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

      2. Run it.

        [service0@yourserver service0]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
        +directory.

      3. Run it.

        [service0 service0]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/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

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

        [service0@yourserver service0]$ exit
        +[service0 service0]$

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

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

        [service0 service0]$ exit
         logout
         
        -[root@yourserver root]# emacs /etc/cron.daily/analog

        Put this into the file:

        #!/bin/sh
        +[root root]# emacs /etc/cron.daily/analog

        Put this into the file:

        #!/bin/sh
         
        -/usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
        [root@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

    External uptime validation

    The OpenACS uptime site can monitor your site and send you an email whenever your site fails to respond. If you test the url http://yourserver.test/SYSTEM/dbtest.tcl, you should get back the string success.

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

    Test it by running the script.

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

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

    External uptime validation

    The OpenACS uptime site can monitor your site and send you an email whenever your site fails to respond. If you test the url http://yourserver.test/SYSTEM/dbtest.tcl, you should get back the string success.

    ($Id$)
    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.23.2.3 -r1.23.2.4 --- openacs-4/packages/acs-core-docs/www/objects.html 8 Dec 2003 15:41:18 -0000 1.23.2.3 +++ openacs-4/packages/acs-core-docs/www/objects.html 15 Dec 2003 15:03:47 -0000 1.23.2.4 @@ -78,7 +78,7 @@ Fire up your text editor and open the ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created when we created the package. Then, do the following: -

    Describe the new type to the type system

    +

    Describe the new type to the type system

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

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

    Define a table in which to store your objects

    +

    Define a table in which to store your objects

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

    Define a package for type specific procedures

    +

    Define a package for type specific procedures

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

    Define a package body for type specific procedures

    +

    Define a package body for type specific procedures

    The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use acs_object.new to insert a row into Index: openacs-4/packages/acs-core-docs/www/openacs-unpack.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-unpack.html,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/acs-core-docs/www/openacs-unpack.html 8 Dec 2003 15:41:18 -0000 1.8.2.2 +++ openacs-4/packages/acs-core-docs/www/openacs-unpack.html 15 Dec 2003 15:03:47 -0000 1.8.2.3 @@ -1,17 +1,17 @@ Unpack the OpenACS tarball

    Unpack the OpenACS tarball

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

    [root@yourserver root]# cd /tmp
    -[root@yourserver tmp]# tar xzf openacs-5.0.0b4.tgz
    -
    cd /tmp
    -tar xzf openacs-5.0.0b4.tgz

    If you are installing from a different method and just need the configuration files, you can instead get them from CVS:

    [root@yourserver root]# cd /tmp
    -[root@yourserver tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
    +      files, unpack the tarball now.

    [root root]# cd /tmp
    +[root tmp]# tar xzf openacs-5.0.0b4.tgz
    +cd /tmp
    +tar xzf openacs-5.0.0b4.tgz

    If you are installing from a different method and just need the configuration files, you can instead get them from CVS:

    [root root]# cd /tmp
    +[root tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
     cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory
     cvs server: Updating openacs-4/packages/acs-core-docs/www/files
     U openacs-4/packages/acs-core-docs/www/files/README.TXT
     (many lines omitted)
     U openacs-4/packages/acs-core-docs/www/files/template-ini.ini
     U openacs-4/packages/acs-core-docs/www/files/winnsd.txt
    -[root@yourserver tmp]# mv openacs-4 openacs-5.0.0b4
    -
    cd /tmp
    +[root tmp]# mv openacs-4 openacs-5.0.0b4
    +cd /tmp
     cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
    -mv openacs-4 openacs-5.0.0a4
    View comments on this page at openacs.org
    +mv openacs-4 openacs-5.0.0a4
    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.22.2.3 -r1.22.2.4 --- openacs-4/packages/acs-core-docs/www/openacs.html 8 Dec 2003 15:41:18 -0000 1.22.2.3 +++ openacs-4/packages/acs-core-docs/www/openacs.html 15 Dec 2003 15:03:47 -0000 1.22.2.4 @@ -1,18 +1,18 @@ -Install OpenACS 5.0.0b4

    Install OpenACS 5.0.0b4

    by Vinod Kurup

    +Install OpenACS 5.0.0b4

    Install OpenACS 5.0.0b4

    by Vinod Kurup

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

    Set up the file system for one or more OpenACS Sites

    For Linux Standard Base compliance and ease of backup, all of the files in each OpenACS site are stored in a subdirectory of /var/lib/aolserver, one subdirectory per site. The first time you install an OpenACS - site on a server, you must create the parent directory and set its permissions:

    [root@yourserver root]# mkdir /var/lib/aolserver
    -[root@yourserver root]# chgrp web /var/lib/aolserver
    -[root@yourserver root]# chmod 770 /var/lib/aolserver
    -[root@yourserver root]#
    -
    mkdir /var/lib/aolserver
    +      site on a server, you must create the parent directory and set its permissions:

    [root root]# mkdir /var/lib/aolserver
    +[root root]# chgrp web /var/lib/aolserver
    +[root root]# chmod 770 /var/lib/aolserver
    +[root root]#
    +mkdir /var/lib/aolserver
     chgrp web /var/lib/aolserver
    -chmod 770 /var/lib/aolserver

    Set up a user account for each site.

    +chmod 770 /var/lib/aolserver

    Set up a user account for each site.

    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 @@ -33,30 +33,30 @@ developers for that specific instance. Add this user, and put it in the service0 group so that it can use database and server commands associated with that group. -

    [root@yourserver root]# groupadd web
    -[root@yourserver root]# useradd -g service0 -G web service0 -d /home/service0
    -[root@yourserver root]#

    Install with automated script (EXPERIMENTAL)

    Starting with OpenACS 5.0, an experimental script is +

    [root root]# groupadd web
    +[root root]# useradd -g service0 -G web service0 -d /home/service0
    +[root root]#

    Install with automated script (EXPERIMENTAL)

    Starting with OpenACS 5.0, an experimental script is available to automate all of the steps for the rest of this section. Requires tclwebtest. If you are not feeling lucky, skip to the section called “Install from tarball”.

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

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

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

    Edit /home/service0/install/install.tcl and change the values as documented in the file. It will work - unchanged at 127.0.0.1:8000.

    Run the file as root.

    [service0@yourserver service0]$ exit 
    -[root@yourserver root]# sh /home/service0/install/install.sh
    +        unchanged at 127.0.0.1:8000.

    Run the file as root.

    [service0 service0]$ exit 
    +[root root]# sh /home/service0/install/install.sh
     /home/service0/install/install.sh: Starting installation with config_file 
     /home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/
     service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes, 
    @@ -65,30 +65,30 @@
     ./install.sh: Finished (re)installing /var/lib/aolserver/service0 at Wed Nov  
     5 13:27:17 CET 2003.  Access the new site at http://127.0.0.1:8000 with admin 
     username admin@yourserver.test and password 1
    -[root@yourserver root]#

    You can proceed to the section called “Next Steps”.

    Install from tarball

    You should already have downloaded the OpenACS tarball +[root root]#

    You can proceed to the section called “Next Steps”.

    Install from tarball

    You should already have downloaded the OpenACS tarball to the /tmp directory. If not, download the OpenACS tarball and save it in - /tmp and proceed:

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

      [root@yourserver root]# su - service0
      -[service0@yourserver service0]$ cd /var/lib/aolserver
      -[service0@yourserver aolserver]$ tar xzf /tmp/openacs-5.0.0b4.tgz
      -[service0@yourserver aolserver]$ mv openacs-5.0.0b4 service0
      -[service0@yourserver aolserver]$ chmod -R 700 service0
      -[service0@yourserver aolserver]$ ls -al
      +      /tmp and proceed:

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

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

      3. Prepare the database

    2. Add the Service to CVS (OPTIONAL)

    3. Prepare the database

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

        You should be sure that your user account (e.g. service0) is in the dba group. @@ -105,14 +105,14 @@

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

        +[root ~]# adduser service0 dba

        If you get an error about an undefined group, then add that group manually:

        -root:~# groupadd dba
        -root:~# groupadd web

        +[root ~]# groupadd dba +[root ~]# groupadd web

        Make sure to logout as root when you are finished with this step and log back in as @@ -162,10 +162,10 @@ SVRMGR> exit service0:~$ su - Password: ************ -root:~# mkdir -p /ora8/m02/oradata/ora8/ -root:~# chown service0.web /ora8/m02/oradata/ora8 -root:~# chmod 775 /ora8/m02/oradata/ora8 -root:~# exit +[root ~]# mkdir -p /ora8/m02/oradata/ora8/ +[root ~]# chown service0.web /ora8/m02/oradata/ora8 +[root ~]# chmod 775 /ora8/m02/oradata/ora8 +[root ~]# exit service0:~$

      • Create a tablespace for the service. It is important that the @@ -223,31 +223,31 @@ in the wrong format, make sure you followed the steps outlined in the section called “Troubleshooting Oracle Dates”

  • Prepare PostgreSQL for an OpenACS Service.�

    • PostgreSQL:

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

      [root@yourserver root]# su - postgres
      -[postgres@yourserver pgsql]$ createuser -a -d service0
      +            name.  With default PostgreSQL authentication, a system user connecting locally automatically authenticates as the postgres user of the same name, if one exists.  We currently use postgres "super-users" for everything, which means that anyone with access to any of the openacs system accounts on a machine has full access to all postgresql databases on that machine.

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

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

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

      [service0@yourserver service0]$ 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-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
      -0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
    • Add Full Text Search Support (OPTIONAL)

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

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

      Add 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-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
      +0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
    • Add Full Text Search Support (OPTIONAL)

    • [service0 service0]$ exit
       logout
       
      -[root@yourserver root]# 
  • Configure an AOLserver Service for OpenACS.�

    1. +[root 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, /var/lib/aolserver/service0/etc/config.tcl. - Open it in an editor to adjust the parameters.

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

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

      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.

      [service0 service0]$ exit
       logout
       
      -[root@yourserver root]#
    2. Test your backup and recovery procedure.

    3. Set up the section called “External uptime validation”.

    ($Id$)
  • View comments on this page at openacs.org
    +[root root]#
  • Test your backup and recovery procedure.

  • Set up the section called “External uptime validation”.

  • ($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.22.2.3 -r1.22.2.4 --- openacs-4/packages/acs-core-docs/www/oracle.html 8 Dec 2003 15:41:18 -0000 1.22.2.3 +++ openacs-4/packages/acs-core-docs/www/oracle.html 15 Dec 2003 15:03:47 -0000 1.22.2.4 @@ -1,4 +1,4 @@ -Install Oracle 8.1.7

    Install Oracle 8.1.7

    By Vinod Kurup

    +Install Oracle 8.1.7

    Install Oracle 8.1.7

    By Vinod Kurup

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

    Note

    @@ -85,16 +85,16 @@ startx

    -joeuser:~$ startx

    +[joeuser ~]$ startx

  • Open a terminal window type and login as root

    -joeuser:~$ su -
    +[joeuser ~]$ su -
     Password: ***********
    -root:~#

    +[root ~]#

  • @@ -108,11 +108,11 @@ stopping the database.

    -root:~# groupadd dba
    -root:~# groupadd oinstall
    -root:~# groupadd oracle
    -root:~# useradd -g dba -G oinstall,oracle -m oracle
    -root:~# passwd oracle

    +[root ~]# groupadd dba +[root ~]# groupadd oinstall +[root ~]# groupadd oracle +[root ~]# useradd -g dba -G oinstall,oracle -m oracle +[root ~]# passwd oracle

    You will be prompted for the New Password and Confirmation of that password. @@ -131,7 +131,7 @@ install successfully.

    -root:~# mkdir /ora8
    +[root ~]# mkdir /ora8
     root:/ora8# cd /ora8
     root:/ora8# mkdir -p m01 m02 m03/oradata/ora8
     root:/ora8# chown -R oracle.dba /ora8
    @@ -147,7 +147,7 @@
                   following:
     
                 

    -joeuser:~$ su - oracle
    +[joeuser ~]$ su - oracle
     Password: ********
  • Use a text editor to edit the @@ -156,7 +156,7 @@ directory.

    -oracle:~$ emacs .bash_profile

    +[oracle ~]$ emacs .bash_profile

    You may get this error trying to start emacs: @@ -171,13 +171,13 @@ If so, open a new terminal window and do the following:

    -joeuser:~$ xhost +localhost

    +[joeuser ~]$ xhost +localhost

    Now, back in the oracle terminal:

    -oracle:~$ export DISPLAY=localhost:0.0
    -oracle:~$ emacs .bash_profile

    +[oracle ~]$ export DISPLAY=localhost:0.0 +[oracle ~]$ emacs .bash_profile

    Try this procedure anytime you get an Xlib connection refused error. @@ -222,7 +222,7 @@ Log out as oracle

    -oracle:~$ exit
  • +[oracle ~]$ exit

  • Log back in as oracle and double check that your environment variables are as intended. The @@ -232,8 +232,8 @@ you want (those with ORA in it).

    -joeuser:~$ su - oracle
    -oracle:~$ env | grep ORA

    +[joeuser ~]$ su - oracle +[oracle ~]$ env | grep ORA

    If it worked, you should see: @@ -263,7 +263,7 @@ by typing:

    -oracle:~$ echo $PATH
    +[oracle ~]$ echo $PATH
     /bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.7/bin

    If they are not, then add them to the @@ -275,10 +275,10 @@ Log in as oracle and start X if not already running. Start a new terminal:

    -joeuser:~$ xhost +localhost
    -joeuser:~$ su - oracle
    +[joeuser ~]$ xhost +localhost
    +[joeuser ~]$ su - oracle
     Password: **********
    -oracle:~$ export DISPLAY=localhost:0.0
  • +[oracle ~]$ export DISPLAY=localhost:0.0

  • Find the runInstaller script @@ -289,17 +289,17 @@ the cd-rom mount point

    -oracle:~$ su - root
    -root:~# mount -t iso9660 /dev/cdrom /mnt/cdrom
    -root:~# exit
    -oracle:~$ cd /mnt/cdrom
  • +[oracle ~]$ su - root +[root ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom +[root ~]# exit +[oracle ~]$ cd /mnt/cdrom

  • If you are installing from the tarball, the install script is located in the Oracle8iR2 directory that was created when you expanded the archive.

    -oracle:~$ cd /where/oracle/Disk1
  • +[oracle ~]$ cd /where/oracle/Disk1

    Check to make sure the file is there. @@ -388,18 +388,18 @@ /usr/bin/awk before running the script below

    -joueser:~$ su -
    -root:~# ln -s /usr/bin/awk /bin/awk
  • +[joueser ~]$ su - +[root ~]# ln -s /usr/bin/awk /bin/awk

  • Open a new terminal window, then type: -

    joeuser:~$ su -
    -root:~# cd /ora8/m01/app/oracle/product/8.1.7
    -root:~# ./orainstRoot.sh  
    +        

    [joeuser ~]$ su -
    +[root ~]# cd /ora8/m01/app/oracle/product/8.1.7
    +[root ~]# ./orainstRoot.sh  
     ; You should see:
     Creating Oracle Inventory pointer file (/etc/oraInst.loc)
     Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall.
    -root:~# mkdir -p /usr/local/java
    -root:~# exit
    -joeuser:~$ exit
  • +[root ~]# mkdir -p /usr/local/java +[root ~]# exit +[joeuser ~]$ exit

  • Click "Retry"

  • The "Available Products" screen in the OUI: @@ -515,11 +515,11 @@ su to get root privileges, while keeping the oracle user's enviroment.

    -joeuser:~$ su - oracle
    +[joeuser ~]$ su - oracle
     Password: *********
    -oracle:~$ su
    +[oracle ~]$ su
     Password: *********
    -root:~# /ora8/m01/app/oracle/product/8.1.7/root.sh
    +[root ~]# /ora8/m01/app/oracle/product/8.1.7/root.sh
     ; You should see the following.   
     
     Creating Oracle Inventory pointer file (/etc/oraInst.loc)
    @@ -549,8 +549,8 @@
                   Do not follow the instructions on deleting trace
                   and log files, it is not necessary.
                 

  • -root:~# exit
    -joeuser:~$ exit
  • +[root ~]# exit +[joeuser ~]$ exit

  • Go back to the pop-up window and click "OK"

  • The "Configuration Tools" screen in the OUI @@ -649,11 +649,11 @@ su to oracle and then run the dbassist program.

    -joeuser:~$ xhost +localhost
    -joeuser:~$ su - oracle
    +[joeuser ~]$ xhost +localhost
    +[joeuser ~]$ su - oracle
     Password: *********
    -oracle:~$ export DISPLAY=localhost:0.0
    -oracle:~$ dbassist
  • +[oracle ~]$ export DISPLAY=localhost:0.0 +[oracle ~]$ dbassist

  • The "Welcome" screen in the Oracle Database Configuration Agent (ODCA)

    • @@ -751,7 +751,7 @@ /ora8/m01/app/oracle/product/8.1.7, the following will open the file for editing.

      -oracle:~$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora
    • +[oracle ~]$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora

    • Add the following line to the end:

       nls_date_format = "YYYY-MM-DD"
    • @@ -782,7 +782,7 @@ Change to the directory where the database creation script is and run it:

      -oracle:~$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib
      +[oracle ~]$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib
       oracle:/ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib$ ./sqlora8.sh

      In some instances, Oracle will save the file to /ora8/m01/app/oracle/product/8.1.7/assistants/dbca @@ -808,16 +808,16 @@

    • In the oracle shell, copy the file.

      -oracle:~$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
    • +[oracle ~]$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql

    • Once you've got the acceptance test file all set, stay in your term and type the following:

      -oracle:~$ sqlplus system/manager

      +[oracle ~]$ sqlplus system/manager

      SQL*Plus should startup. If you get an ORA-01034: Oracle not Available error, it is because your Oracle instance is not running. You can manually start it as the oracle user.

      -oracle:~$ svrmgrl
      +[oracle ~]$ svrmgrl
       SVRMGR> connect internal
       SVRMGR> startup
    • Now that you're into SQL*Plus, change the default passwords @@ -878,8 +878,8 @@ /tmp. Then, as oracle, do the following:

      -oracle:~$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart 
      -oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart
    • +[oracle ~]$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart +[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart

    • While you're logged in as oracle, you should configure the @@ -909,15 +909,15 @@ /etc/rc.d/init.d throughout this section)

      -oracle:~$ su -
      -root:~# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i
      -root:~# chown root.root /etc/rc.d/init.d/oracle8i
      -root:~# chmod 755 /etc/rc.d/init.d/oracle8i
    • +[oracle ~]$ su - +[root ~]# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i +[root ~]# chown root.root /etc/rc.d/init.d/oracle8i +[root ~]# chmod 755 /etc/rc.d/init.d/oracle8i

    • Test the script by typing the following commands and checking the output. (Debian Users: as root, do mkdir /var/lock/subsys first)

      -root:~# /etc/rc.d/init.d/oracle8i stop
      +[root ~]# /etc/rc.d/init.d/oracle8i stop
       Oracle 8i auto start/stop
       Shutting Oracle8i:
       Oracle Server Manager Release 3.1.7.0.0 - Production
      @@ -938,7 +938,7 @@
       Server Manager complete.
       Database "ora8" shut down.
             
      -root:~# /etc/rc.d/init.d/oracle8i start
      +[root ~]# /etc/rc.d/init.d/oracle8i start
       Oracle 8i auto start/stop
       Starting Oracle8i: 
       SQL*Plus: Release 8.1.7.0.0 - Production on Wed Mar 6 17:56:02 2002
      @@ -963,12 +963,12 @@
                 If it worked, then run these commands to make the startup and
                 shutdown automatic. 
               

      • Red Hat users:

        -root:~# cd /etc/rc.d/init.d/                      
        -root:~# chkconfig --add oracle8i
        -root:~# chkconfig --list oracle8i
        +[root ~]# cd /etc/rc.d/init.d/                      
        +[root ~]# chkconfig --add oracle8i
        +[root ~]# chkconfig --list oracle8i
         ; You should see:
         oracle8i        0:off   1:off   2:off   3:on    4:on    5:on    6:off
      • Debian users:

        -root:~# update-rc.d oracle8i defaults
        +[root ~]# update-rc.d oracle8i defaults
          Adding system startup for /etc/init.d/oracle8i ...
            /etc/rc0.d/K20oracle8i -> ../init.d/oracle8i
            /etc/rc1.d/K20oracle8i -> ../init.d/oracle8i
        @@ -977,7 +977,7 @@
            /etc/rc3.d/S20oracle8i -> ../init.d/oracle8i
            /etc/rc4.d/S20oracle8i -> ../init.d/oracle8i
            /etc/rc5.d/S20oracle8i -> ../init.d/oracle8i
      • SuSE users:

        -root:~# cd /etc/rc.d/init.d
        +[root ~]# cd /etc/rc.d/init.d
         root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i K20oracle8i
         root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i S20oracle8i
         root:/etc/rc.d/init.d# cp K20oracle8i rc0.d
        @@ -997,7 +997,7 @@
         root:/etc/rc.d/init.d# rm K20oracle8i
         root:/etc/rc.d/init.d# rm S20oracle8i
         root:/etc/rc.d/init.d# cd
        -root:~# SuSEconfig
        +[root ~]# SuSEconfig
         Started the SuSE-Configuration Tool.
         Running in full featured mode.
         Reading /etc/rc.config and updating the system...
        @@ -1035,14 +1035,14 @@
                   Now issue the following commands (still as
                   root).
                 

        -root:~# su - oracle
        -oracle:~$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
        -oracle:~$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr    
        -oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
        -oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
        -oracle:~$ exit
        -root:~# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
        -root:~# cd /etc/rc.d/init.d
        +[root ~]# su - oracle
        +[oracle ~]$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
        +[oracle ~]$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr    
        +[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
        +[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
        +[oracle ~]$ exit
        +[root ~]# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
        +[root ~]# cd /etc/rc.d/init.d
         root:/etc/rc.d/init.d# chmod 755 listener8i

        Test the listener automation by running the following commands and checking the output. @@ -1096,8 +1096,8 @@ sqlplus username/password/@SID

        -root:~# su - oracle
        -oracle:~$ sqlplus system/alexisahunk@ora8
        +[root ~]# su - oracle
        +[oracle ~]$ sqlplus system/alexisahunk@ora8
         
         SQL> select sysdate from dual;
         
        @@ -1106,19 +1106,19 @@
         2002-02-22
         
         SQL> exit
        -oracle:~$ exit
        -root:~#
        • RedHat users:

          +[oracle ~]$ exit +[root ~]#

        • RedHat users:

          Now run chkconfig on the listener8i script.

          -root:~# cd /etc/rc.d/init.d/
          +[root ~]# cd /etc/rc.d/init.d/
           root:/etc/rc.d/init.d# chkconfig --add listener8i
           root:/etc/rc.d/init.d# chkconfig --list listener8i
           listener8i      0:off   1:off   2:off   3:on    4:on    5:on    6:off
        • Debian users:

          Now run update-rc.d on the listener8i script.

          -root:~# update-rc.d listener8i defaults 21 19
          +[root ~]# update-rc.d listener8i defaults 21 19
            Adding system startup for /etc/init.d/listener8i ...
              /etc/rc0.d/K19listener8i -> ../init.d/listener8i
              /etc/rc1.d/K19listener8i -> ../init.d/listener8i
          @@ -1132,11 +1132,11 @@
                     As a final test, reboot your computer and make sure Oracle comes
                     up. You can do this by typing
                   

          -root:~# /sbin/shutdown -r -t 0 now

          +[root ~]# /sbin/shutdown -r -t 0 now

          Log back in and ensure that Oracle started automatically.

          -joeuser:~$ su - oracle
          -oracle:~$ sqlplus system/alexisahunk@ora8
          +[joeuser ~]$ su - oracle
          +[oracle ~]$ sqlplus system/alexisahunk@ora8
           
           SQL> exit

        Congratulations, your installation of Oracle 8.1.7 is @@ -1174,7 +1174,7 @@ isn't working, make sure that you have restarted the database since adding the line:

        -joeuser:~$ svrmgrl
        +[joeuser ~]$ svrmgrl
         SVRMGR> connect internal
         Connected.
         SVRMGR> shutdown
        @@ -1202,7 +1202,7 @@
                 

        • Run sqlplus as the dba:

          -oracle:~$ sqlplus system/changeme
        • +[oracle ~]$ sqlplus system/changeme

      • To drop a user and all of the tables and data owned by that user:

        @@ -1219,4 +1219,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/permissions-tediously-explained.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html,v diff -u -r1.16.2.3 -r1.16.2.4 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 8 Dec 2003 15:41:18 -0000 1.16.2.3 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 15 Dec 2003 15:03:47 -0000 1.16.2.4 @@ -100,7 +100,7 @@

    Context Hierarchy

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

    Table�8.1.�Context Hierarchy Example

    A

    +

    Table�8.1.�Context Hierarchy Example

    A

    object_id=10

    B

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

    Table�8.2.�acs_objects example data

    object_idcontext_id
    2010
    3010
    4020
    5020
    6030

    +

    Table�8.2.�acs_objects example data

    object_idcontext_id
    2010
    3010
    4020
    5020
    6030

    The first entry tells us that object 20 is the descendant of object 10, and the third entry shows that object 40 is the descendant of object 20. By running a CONNECT BY query, Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -r1.21.2.3 -r1.21.2.4 --- openacs-4/packages/acs-core-docs/www/postgres.html 8 Dec 2003 15:41:18 -0000 1.21.2.3 +++ openacs-4/packages/acs-core-docs/www/postgres.html 15 Dec 2003 15:03:47 -0000 1.21.2.4 @@ -11,122 +11,122 @@ can skip a few steps. These shell commands add some links for compatibility with the directories from a source-based install; start the service; create a new group for web service users, and modify the postgres user's environment (more - information):

    [root@yourserver root]# ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
    -[root@yourserver root]# ln -s /var/lib/pgsql /usr/local/pgsql
    -[root@yourserver root]# ln -s /etc/init.d/postgresql /etc/init.d/postgres
    -[root@yourserver root]# service postgresql start
    +  information):

    [root root]# ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
    +[root root]# ln -s /var/lib/pgsql /usr/local/pgsql
    +[root root]# ln -s /etc/init.d/postgresql /etc/init.d/postgres
    +[root root]# service postgresql start
     Initializing database:
                                                                [  OK  ]
     Starting postgresql service:                               [  OK  ]
    -[root@yourserver root]# echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
    -[root@yourserver root]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
    -[root@yourserver root]# groupadd web
    -[root@yourserver root]# su - postgres
    +[root root]# echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
    +[root root]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
    +[root root]# groupadd web
    +[root root]# su - postgres
     -bash-2.05b$
    -
    
    +
     ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
     ln -s /var/lib/pgsql /usr/local/pgsql
     service postgresql start
     echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
     echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
     groupadd web
    -su - postgres

    ... and then skip to 6. Something similar may work for other binary packages as well.

    1. Unpack PostgreSQL.�If you have not downloaded the postgresql tarball to +su - postgres

    ... and then skip to 6. Something similar may work for other binary packages as well.

    1. Unpack PostgreSQL.�If you have not downloaded the postgresql tarball to /tmp/postgresql-7.3.4.tar.gz, - get it.

      [root@yourserver root]# cd /usr/local/src
      -[root@yourserver src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
      -[root@yourserver src]# 
      -
      cd /usr/local/src
      -tar xzf /tmp/postgresql-7.3.4.tar.gz
    2. Create the Postgres user.� + get it.

      [root root]# cd /usr/local/src
      +[root src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
      +[root src]# 
      +cd /usr/local/src
      +tar xzf /tmp/postgresql-7.3.4.tar.gz
    3. 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.3.4
      -[root@yourserver src]# chmod 750 /usr/local/pgsql
      -[root@yourserver src]#
      -
      groupadd web
      +	

      [root src]# groupadd web
      +[root src]# useradd -g web -d /usr/local/pgsql postgres
      +[root src]# mkdir -p /usr/local/pgsql
      +[root src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4
      +[root src]# chmod 750 /usr/local/pgsql
      +[root 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.3.4
      -chmod 750 /usr/local/pgsql
    4. Set up postgres's environment variables.�They are necessary for the executable to find its supporting +chmod 750 /usr/local/pgsql

    5. 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:/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:/usr/local/pgsql/lib" >> ~postgres/.bashrc
      -echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc

      Test this by logging in as + lines to the postgres shell config file.

      [root src]# echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
      +[root src]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
      +echo "export 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
      +	paths; you should see /usr/local/pgsql/bin

      [root src]# su - postgres
      +[postgres pgsql]$ env | grep 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
      +[postgres pgsql]$ exit
       
    6. 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. -

      [root@yourserver src]# su - postgres
      -[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.3.4
      -[postgres@yourserver postgresql-7.3.4]$ ./configure
      +	  Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.
      +	

      [root src]# su - postgres
      +[postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4
      +[postgres postgresql-7.3.4]$ ./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.3.4]$ make all
      +[postgres postgresql-7.3.4]$ make all
       make -C doc all
       make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc'
       (many lines omitted)
       make[1]: Leaving directory `/usr/local/src/postgresql-7.3.4/src'
       All of PostgreSQL successfully made. Ready to install.
      -[postgres@yourserver postgresql-7.3.4]$ make install
      +[postgres postgresql-7.3.4]$ make install
       make -C doc install
       make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc'
       (many lines omitted)
       Thank you for choosing PostgreSQL, the most advanced open source database
       engine.
      -
      su - postgres
      +su - postgres
       cd /usr/local/src/postgresql-7.3.4
       ./configure
       make all
      -make install
    7. Start PostgreSQL.� +make install

    8. Start PostgreSQL.� The initdb command initializes the database. pg_ctl is used to start up PostgreSQL. -

      [postgres@yourserver tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
      +	

      [postgres 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
      +[postgres 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

      +[postgres 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

    9. Install Pl/pgSQL.�Set up plpgsq 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
      +	  with the createlang command in list mode.

      [postgres pgsql]$ createlang plpgsql template1
      +[postgres pgsql]$ createlang -l template1
       Procedural languages
         Name   | Trusted?
       ---------+----------
        plpgsql | t
       (1 row)
       
      -[postgres@yourserver pgsql]$
      -
      createlang plpgsql template1
      -createlang -l template1
    10. Test PostgreSQL (OPTIONAL).�Create a database and try some simple commands. The output should be as shown. -

      [postgres@yourserver pgsql]$ createdb mytestdb
      +[postgres pgsql]$
      +createlang plpgsql template1
      +createlang -l template1
    11. Test PostgreSQL (OPTIONAL).�Create a database and try some simple commands. The output should be as shown. +

      [postgres pgsql]$ createdb mytestdb
       CREATE DATABASE
      -[postgres@yourserver pgsql]$ psql mytestdb
      +[postgres pgsql]$ psql mytestdb
       Welcome to psql, the PostgreSQL interactive terminal.
       
       Type:  \copyright for distribution terms
      @@ -150,55 +150,55 @@
       (1 row)
       
       mytestdb=# \q
      -[postgres@yourserver pgsql]$ dropdb mytestdb
      +[postgres pgsql]$ dropdb mytestdb
       DROP DATABASE
      -[postgres@yourserver pgsql]$ exit
      +[postgres pgsql]$ exit
       logout
       
      -[root@yourserver src]#
    12. Set PostgreSQL to start on boot. First, we copy the +[root src]#

    13. 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. -

      • Red Hat RPM:

        The init script is already installed; just turn it on for the appropriate run levels.

        [root@yourserver root]# chkconfig --level 345 postgresql on
        -[root@yourserver root]# 
      • Red Hat from source:

        [root@yourserver src]# cp /tmp/openacs-5.0.0b4/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 755 /etc/rc.d/init.d/postgresql
        -[root@yourserver src]# 
        -
        cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +	

        • Red Hat RPM:

          The init script is already installed; just turn it on for the appropriate run levels.

          [root root]# chkconfig --level 345 postgresql on
          +[root root]# 
        • Red Hat from source:

          [root src]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
          +[root src]# chown root.root /etc/rc.d/init.d/postgresql
          +[root src]# chmod 755 /etc/rc.d/init.d/postgresql
          +[root src]# 
          +cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
           chown root.root /etc/rc.d/init.d/postgresql
          -chmod 755 /etc/rc.d/init.d/postgresql

        Test the script.

        [root@yourserver root]# service postgresql stop
        +chmod 755 /etc/rc.d/init.d/postgresql

        Test the script.

        [root root]# service postgresql stop
         Stopping PostgreSQL: ok
        -[root@yourserver root]# 

        If PostgreSQL successfully stopped, then use the following +[root root]#

        If PostgreSQL successfully stopped, then use the following command to make sure that the script is run appropriately at boot and shutdown. And turn it back on because we'll use it later. -

        [root@yourserver root]# chkconfig --add postgresql
        -[root@yourserver root]# chkconfig --level 345 postgresql on
        -[root@yourserver root]# chkconfig --list postgresql
        +		

        [root root]# chkconfig --add postgresql
        +[root root]# chkconfig --level 345 postgresql on
        +[root 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
        +[root root]# service postgresql start
         Starting PostgreSQL: ok
        -[root@yourserver root]#
        -
        chkconfig --add postgresql
        +[root root]#
        +chkconfig --add postgresql
         chkconfig --level 345 postgresql on
         chkconfig --list postgresql
        -service postgresql start
      • Debian:

        root:~# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        -root:~# chown root.root /etc/init.d/postgresql
        -root:~# chmod 755 /etc/init.d/postgresql
        -root:~# 
        
        +service postgresql start
      • Debian:

        [root ~]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
        +[root ~]# chown root.root /etc/init.d/postgresql
        +[root ~]# chmod 755 /etc/init.d/postgresql
        +[root ~]# 
         cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
         chown root.root /etc/init.d/postgresql
        -chmod 755 /etc/init.d/postgresql

        Test the script

        root:~# /etc/init.d/postgresql stop
        +chmod 755 /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 +[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
        +[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
        @@ -207,9 +207,9 @@
            /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:~#
      • SuSE:

        Note

        +[root ~]#

      • SuSE:

        Note

        I have received reports that SuSE 8.0 is different from previous versions. Instead of installing the boot scripts in @@ -219,20 +219,20 @@ rc.d/ part in each of the following commands. -

        root:~# cp /tmp/openacs-5.0.0b4/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 755 /etc/rc.d/init.d/postgresql

        +

      [root ~]# cp /tmp/openacs-5.0.0b4/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 755 /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 ~]# 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
      @@ -262,8 +262,8 @@
             little. This usually isn't a problem as Red Hat defaults to runlevel 3)
       
           

    14. Tune postgres. (OPTIONAL).�The default values for PostgreSQL are very conservative; we can safely change some of them and improve performance.

      1. Change the kernel parameter for maximum shared memory - segment size to 128Mb:

        [root@yourserver root]# echo 134217728 >/proc/sys/kernel/shmmax
        -[root@yourserver root]#

        Make that change permanent by editing + segment size to 128Mb:

        [root root]# echo 134217728 >/proc/sys/kernel/shmmax
        +[root root]#

        Make that change permanent by editing /etc/sysctl.conf to add these lines at the end:

        # increase shared memory limit for postgres
         kernel.shmmax = 134217728
      2. Edit the PostgreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information)

        #       Shared Memory Size
        Index: openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html,v
        diff -u -r1.13.2.3 -r1.13.2.4
        --- openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html	8 Dec 2003 15:41:18 -0000	1.13.2.3
        +++ openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html	15 Dec 2003 15:03:47 -0000	1.13.2.4
        @@ -1,8 +1,8 @@
        -Add PSGML commands to emacs init file (OPTIONAL)

        Add PSGML commands to emacs init file (OPTIONAL)

        +Add PSGML commands to emacs init file (OPTIONAL)

        Add PSGML commands to emacs init file (OPTIONAL)

        If you plan to write or edit any documentation with emacs, install a customized emacs configuration file with DocBook commands in the skeleton directory, so it will be used for all new users. The file also fixes the backspace -> help mis-mapping that often occurs in - terminals.

        [root@yourserver tmp]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
        +      terminals.

        [root tmp]# cp /tmp/openacs-5.0.0b4/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
         cp: overwrite `/etc/skel/.emacs'? y
        -[root@yourserver tmp]# 

        Debian users:

        apt-get install psgml

        Note: The new nxml mode for emacs, when used in combination with psgml, provides a pretty good set of functionality that makes DocBook editing much less painless. In particular, nxml does syntax testing in real-time so that you can see syntax errors immediately instead of in the output of the xsltproc hours or days later. For debian, apt-get install nxml.

        View comments on this page at openacs.org
        +[root tmp]#

        Debian users:

        apt-get install psgml

        Note: The new nxml mode for emacs, when used in combination with psgml, provides a pretty good set of functionality that makes DocBook editing much less painless. In particular, nxml does syntax testing in real-time so that you can see syntax errors immediately instead of in the output of the xsltproc hours or days later. For debian, apt-get install nxml.

      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.26.2.4 -r1.26.2.5 --- openacs-4/packages/acs-core-docs/www/release-notes.html 8 Dec 2003 16:58:17 -0000 1.26.2.4 +++ openacs-4/packages/acs-core-docs/www/release-notes.html 15 Dec 2003 15:03:48 -0000 1.26.2.5 @@ -93,4 +93,4 @@

    15. Serving backup files and files from the CVS directories is turned off by default via the acs-kernel parameter ExcludedFiles in section request-processor (The variable provides a string match glob list of files and is defaulted to "*/CVS/* *~") -

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

    ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/releasing-openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs.html,v diff -u -r1.6.2.2 -r1.6.2.3 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 8 Dec 2003 15:41:18 -0000 1.6.2.2 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 15 Dec 2003 15:03:48 -0000 1.6.2.3 @@ -1,51 +1,129 @@ -Appendix�E.�How to package and release OpenACS

    Appendix�E.�How to package and release OpenACS

    1. update the version number in packages/acs-core-docs/www/xml/variables.ent, readme.txt, - and all core .info files. Regenerate the html documentation and commit all the changes. -

    2. Check out the cvs tree. The files must be checked out - through a cvs account with write access. In this example, the - cvs user on openacs.org is implied from the ssh login information - previously set up. It could be overridden via foobar@openacs.org.

      -
      cd /tmp
      -cvs -d :pserver:anonymous@openacs.org:/cvsroot checkout openacs-4
      -
      -

      Repeat with the dotlrn cvs tree.

      -
      cd /tmp
      +Appendix�E.�How to package and release OpenACS

      Appendix�E.�How to package and release OpenACS

      1. Update documentation version numbers:

        1. Update /packages/acs-core-docs/www/xml/variables.ent with the new version number and regenerate all HTML docs +

        2. Update /readme.txt with the new version number

        3. + Commit changes +

      2. Check out the whole cvs tree. The files must be checked + out through a cvs account with write access and should be a + checkout from the release branch. In this example, we are assuming + this is being done as a local user on openacs.org (which make the + checkout and tagging operations much faster).

        cd /var/tmp
        +cvs -d /cvsroot checkout -r oacs-5-0 openacs-4

        Repeat with the dotlrn cvs tree.

        cd /var/tmp
         mkdir dotlrn-packages
         cd dotlrn-packages
        -cvs -d :pserver:anonymous@dotlrn@openacs.org:/dotlrn-cvsroot checkout dotlrn-all
        -
    3. Tag the tree.

      
      -cd /tmp/openacs-4
      -cvs tag openacs-5-0-0a1
      -

      Tag dotLRN. Since the dotLRN packages aren't all in one module, we iterate through all of the modules. Log in first (cvs login) so that you don't have to log in for each module.

      
      -cd /tmp/dotlrn-packages
      -for dir in $(ls); do cd $dir; cvs tag dotlrn-2-0-0a3; cd ..; done
      -
    4. Make the tarball

      • openacs-core.�

        1. Go to a new working space and export the tagged files.

          -
          mkdir /tmp/tarball
          -cd /tmp/tarball
          -cvs -d :pserver:anonymous@openacs.org:/cvsroot export -r openacs-5-0-0a1 acs-core
          -mv openacs-4 openacs
          -
        2. Generate the tarball

          
          -cd /tmp/tarball
          -tar cz -f openacs-5.0.0a1.tar.gz openacs
          -
      • dotlrn.�

        1. Go to a new working space and export the tagged +cvs -d /dotlrn-cvsroot checkout -r dotlrn-2-0 dotlrn-all +

        2. Tag the tree.

          cd /var/tmp/openacs-4
          +cvs tag -F openacs-5-0-0a1
          +

          Note that we use the -F flag which will force the tag to the new version (just in + case someone has created the tag already on another version). Excercise care when doing this since + you don't want to inadvertently move a prior release tag. Also if the tagging goes horribly wrong + for some reason you can delete the tag via "cvs tag -d <symbolic_tag>".

          Tag dotLRN. Since the dotLRN packages aren't all in one + module, we iterate through all of the modules. Log in first + (cvs login) so that you don't have to log in for each + module.

          cd /var/tmp/dotlrn-packages
          +for dir in *; do ( cd $dir && cvs tag -F dotlrn-2-0-0a1 ); done
          +
        3. Make the tarball

          • openacs-core.�

            1. Go to a new working space and export the tagged files.

              mkdir /var/tmp/tarball
              +cd /var/tmp/tarball
              +cvs -d /cvsroot export -r openacs-5-0-0a1 acs-core
              +
            2. Generate the tarball.

              cd /var/tmp/tarball
              +mv openacs-4 openacs-5.0.0a1
              +tar cz -f openacs-5.0.0a1.tar.gz openacs-5.0.0a1
              +
          • dotlrn.�

            1. Go to a new working space and export the tagged files. (was getting errors here trying to use -d, so gave up and just moved things from openacs-4 to - openacs at the end)

              -
              mkdir /tmp/dotlrn-tarball
              -cd /tmp/dotlrn-tarball
              -cvs -d :pserver:anonymous@openacs.org:/cvsroot export \
              -  -r openacs-5-0-0a1 acs-core
              -cd /tmp/dotlrn-tarball/openacs-4/packages
              -cvs -d :pserver:anonymous@openacs.org:/cvsroot export \
              -  -r openacs-5-0-0a1 dotlrn-prereq
              -cvs -d :pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot export \
              -  -r dotlrn-2-0-0a1 dotlrn-core
              -cd /tmp/dotlrn-tarball
              -mv openacs-4 openacs
              -
            2. Copy the dotlrn install.xml file, which controls + openacs at the end)

              mkdir /var/tmp/dotlrn-tarball
              +cd /var/tmp/dotlrn-tarball
              +cvs -d /cvsroot export -r openacs-5-0-0a1 acs-core
              +cd /var/tmp/dotlrn-tarball/openacs-4/packages
              +cvs -d /cvsroot export -r openacs-5-0-0a1 dotlrn-prereq
              +cvs -d /dotlrn-cvsroot export -r dotlrn-2-0-0a1 dotlrn-core
              +
            3. Copy the dotlrn install.xml file, which controls which packages are installed on setup, to the root - location:

              
              -cp /tmp/dotlrn-tarball/openacs/packages/dotlrn/install.xml /tmp/dotlrn-tarball/openacs
              -
            4. Generate the tarball

              
              -cd /tmp/tarball
              -tar cz -f dotlrn-2.0.0a1.tar.gz openacs
              -
        4. Test the new tarball

        5. Update on the site

      View comments on this page at openacs.org
      + location:

      cp /var/tmp/dotlrn-tarball/openacs-4/packages/dotlrn/install.xml \
      +   /var/tmp/dotlrn-tarball/openacs-4
      +
    5. Generate the tarball

      cd /var/tmp/dotlrn-tarball
      +mv openacs-4 dotlrn-2.0.0a1
      +tar cz -f dotlrn-2.0.0a1.tar.gz dotlrn-2.0.0a1
      +
  • Test the new tarball

  • Update openacs.org frontpage, bug-tracker versions, project page, etc.

  • Clean up after yourself.

    cd /var/tmp
    +rm -rf tarball dotlrn-tarball dotlrn-packages openacs-5.0.0a1
  • + Here is a shell script that automates this whole process... +

    #!/bin/bash
    +
    +# if TAG=1 create the cvs tags otherwise assume they exist.
    +TAG=1
    +
    +# What release version are we building; version format should be
    +# dashes rather than dots eg. OACS_VERSION=5-0-0b4
    +
    +OACS_VERSION=5-0-0b4
    +DOTLRN_VERSION=2-0-0b4
    +
    +OACS_BRANCH=oacs-5-0
    +DOTLRN_BRANCH=dotlrn-2-0
    +
    +DOTLRN_CVSROOT=/dotlrn-cvsroot
    +OACS_CVSROOT=/cvsroot
    +
    +#
    +# Nothing below here should need to change...
    +#
    +BASE=/var/tmp/release-$OACS_VERSION
    +mkdir $BASE
    +if [ ! -d $BASE ]; then 
    +    echo "Failed creating base dir $BASE"
    +    exit 1
    +fi
    +
    +cd $BASE 
    +
    +if [ $TAG -eq 1 ]; then 
    +
    +    # Checkout and tag the release 
    +    cvs -d $OACS_CVSROOT checkout -r $OACS_BRANCH openacs-4
    +    cd openacs-4 
    +    cvs tag -F openacs-$OACS_VERSION 
    +    cd ../
    +
    +
    +    # Checkout and tag the dotlrn release
    +    mkdir dotlrn-packages
    +    cd dotlrn-packages
    +    cvs -d $DOTLRN_CVSROOT checkout -r $DOTLRN_BRANCH dotlrn-all
    +    for dir in *; do ( cd $dir && cvs tag -F dotlrn-$DOTLRN_VERSION ); done
    +    cd ../
    +
    +    #
    +    # Should check for .sql .xql .adp .tcl .html .xml executable files and squak if found.
    +    #
    +
    +fi
    +
    +
    +
    +# Generate tarballs...
    +#
    +
    +# openacs
    +#
    +mkdir tarball
    +cd tarball
    +cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION acs-core
    +mv opeancs-4 openacs-${OACS_VERSION//-/.}
    +tar -czf ../openacs-${OACS_VERSION//-/.}.tar.gz openacs-${OACS_VERSION//-/.}
    +cd ..
    +
    +# dotlrn
    +#
    +mkdir dotlrn-tarball
    +cd dotlrn-tarball
    +cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION acs-core
    +cd  openacs-4/packages
    +cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION dotlrn-prereq
    +cvs -d $DOTLRN_CVSROOT export -r dotlrn-$DOTLRN_VERSION dotlrn-core
    +cd ../..
    +cp -f openacs-4/packages/dotlrn/install.xml openacs-4
    +mv openacs-4 dotlrn-${DOTLRN_VERSION//-/.}
    +tar -czf ../dotlrn-${DOTLRN_VERSION//-/.}.tar.gz dotlrn-${DOTLRN_VERSION//-/.}
    +
    +
    +# Clean up after ourselves...
    +cd $BASE && rm -rf dotlrn-tarball tarball openacs-4 dotlrn-packages
    +
    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.22.2.3 -r1.22.2.4 --- openacs-4/packages/acs-core-docs/www/request-processor.html 8 Dec 2003 15:41:18 -0000 1.22.2.3 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 15 Dec 2003 15:03:48 -0000 1.22.2.4 @@ -11,7 +11,7 @@ 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 Index: openacs-4/packages/acs-core-docs/www/tutorial-advanced.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-advanced.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 8 Dec 2003 15:41:19 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 15 Dec 2003 15:03:48 -0000 1.14.2.4 @@ -1,15 +1,15 @@ Advanced Topics

    Advanced Topics

    Important

    This section is a work in progress.

    by Joel Aufrecht

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

    Overview

    This tutorial covers topics which are not essential to +

    Overview

    This tutorial covers topics which are not essential to creating a minimal working package. Each section can be used independently of all of the others; all sections assume that you've completed the basic tutorial.

    • How to enforce security so that users can't change other users records

    • How to use the content management tables so that ... what?

    • How to change the default stylesheets for Form Builder HTML forms.

    • How to make your package searchable with OpenFTS/Oracle

    • How to make your package send email notifications

    • How to prepare pagelets for inclusion in other pages

    • How and when to put procedures in a tcl procedure library

    • How to add general_comments to your pages

    • More on ad_form - data validation, other stuff. (plan to draw from Jon Griffin's doc)

    • How and when to implement caching

    • partialquery in xql

    • How to use the html/text entry widget to get the - "does this look right" confirm page

    • APM package dependencies

    Write the Requirements and Design Specs

    It's time to document. For the tutorial we'll use + "does this look right" confirm page

  • APM package dependencies

  • Write the Requirements and Design Specs

    It's time to document. For the tutorial we'll use pre-written documentation. When creating a package from scratch, start by copying the documentation template from /var/lib/aolserver/openacs-dev/packages/acs-core-docs/xml/docs/xml/package-documentation-template.xml @@ -22,11 +22,11 @@ www/doc directory.

    For this tutorial, you should instead install the pre-written documentation files for the tutorial app. Log in as service0, create the standard - directories, and copy the prepared documentation:

    [service0@yourserver service0]$ cd /var/lib/aolserver/service0/packages/samplenote/
    -[service0@yourserver samplenote]$ mkdir -p www/doc/xml
    -[service0@yourserver samplenote]$ cd www/doc/xml
    -[service0@yourserver xml]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/samplenote/* .
    -[service0@yourserver xml]$

    OpenACS uses DocBook for documentation. DocBook is + directories, and copy the prepared documentation:

    [service0 service0]$ cd /var/lib/aolserver/service0/packages/samplenote/
    +[service0 samplenote]$ mkdir -p www/doc/xml
    +[service0 samplenote]$ cd www/doc/xml
    +[service0 xml]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/samplenote/* .
    +[service0 xml]$

    OpenACS uses DocBook for documentation. DocBook is an XML standard for semantic markup of documentation. That means that the tags you use indicate meaning, not intended appearance. The style sheet will determine appearance. You @@ -42,7 +42,7 @@ is stored in the www/docs/ directory. A Makefile is provided to generate html from the xml, and copy all of the supporting files. If Docbook is set up correctly, all you need - to do is:

    [service0@yourserver xml]$ make
    +      to do is:

    [service0 xml]$ make
     cd .. ; /usr/bin/xsltproc ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml
     Writing requirements-introduction.html for sect1(requirements-introduction)
     Writing requirements-overview.html for sect1(requirements-overview)
    @@ -58,25 +58,25 @@
     Writing admin-guide.html for chapter(admin-guide)
     Writing bi01.html for bibliography
     Writing index.html for book
    -[service0@yourserver xml]$

    Verify that the documentation was generated and reflects - your changes by browsing to http://yoursite:8000/samplenote/doc

    Add the new package to CVS

    Before you do any more work, make sure that your work is +[service0 xml]$

    Verify that the documentation was generated and reflects + your changes by browsing to http://yoursite:8000/samplenote/doc

    Add the new package to CVS

    Before you do any more work, make sure that your work is protected by putting it all into cvs. The cvs add command is not recursive, so you'll have to traverse the directory tree manually and add as you go. (More on - CVS)

    [service0@yourserver xml]$ cd ..
    -[service0@yourserver doc]$ cd ..
    -[service0@yourserver www]$ cd ..
    -[service0@yourserver samplenote]$ cd ..
    -[service0@yourserver packages]$ cvs add samplenote/
    +      CVS)

    [service0 xml]$ cd ..
    +[service0 doc]$ cd ..
    +[service0 www]$ cd ..
    +[service0 samplenote]$ cd ..
    +[service0 packages]$ cvs add samplenote/
     Directory /cvsroot/service0/packages/samplenote added to the repository
    -[service0@yourserver packages]$ cd samplenote/
    -[service0@yourserver samplenote]$ cvs add www
    +[service0 packages]$ cd samplenote/
    +[service0 samplenote]$ cvs add www
     Directory /cvsroot/service0/packages/samplenote/www added to the repository
    -[service0@yourserver samplenote]$ cd www
    -[service0@yourserver www]$ cvs add doc
    +[service0 samplenote]$ cd www
    +[service0 www]$ cvs add doc
     Directory /cvsroot/service0/packages/samplenote/www/doc added to the repository
    -[service0@yourserver www]$ cd doc
    -[service0@yourserver doc]$ cvs add *
    +[service0 www]$ cd doc
    +[service0 doc]$ cvs add *
     cvs add: cannot add special file `CVS'; skipping
     cvs add: scheduling file `admin-guide.html' for addition
     cvs add: scheduling file `bi01.html' for addition
    @@ -101,13 +101,13 @@
     cvs add: scheduling file `user-interface.png' for addition
     Directory /cvsroot/service0/packages/samplenote/www/doc/xml added to the repository
     cvs add: use 'cvs commit' to add these files permanently
    -[service0@yourserver doc]$ cd xml
    -[service0@yourserver xml]$ cvs add Makefile index.xml
    +[service0 doc]$ cd xml
    +[service0 xml]$ cvs add Makefile index.xml
     cvs add: scheduling file `Makefile' for addition
     cvs add: scheduling file `index.xml' for addition
     cvs add: use 'cvs commit' to add these files permanently
    -[service0@yourserver xml]$ cd ../../..
    -[service0@yourserver samplenote]$ cvs commit -m "new package"
    +[service0 xml]$ cd ../../..
    +[service0 samplenote]$ cvs commit -m "new package"
     cvs commit: Examining .
     cvs commit: Examining www
     cvs commit: Examining www/doc
    @@ -119,8 +119,8 @@
     initial revision: 1.1
     done
     (many lines omitted)
    -[service0@yourserver samplenote]$

    Delete with confirmation

    We need a way to delete records. We'll create a - recursive confirmation page.

    Add this column to the table_def in index.tcl

    {delete "" {} {<td><a href="note-delete?note_id=$note_id">Delete</a></td>}}

    Create the delete confirmation/execution page.

    [service0@yourserver www]$ emacs note-delete.tcl
    ad_page_contract {
    +[service0 samplenote]$

    Delete with confirmation

    We need a way to delete records. We'll create a + recursive confirmation page.

    Add this column to the table_def in index.tcl

    {delete "" {} {<td><a href="note-delete?note_id=$note_id">Delete</a></td>}}

    Create the delete confirmation/execution page.

    [service0 www]$ emacs note-delete.tcl
    ad_page_contract {
         A page that gets confirmation and then delete notes.
     
         @author joel@aufrecht.org
    @@ -160,7 +160,7 @@
     note_id and
     confirm_p.  If confirm_p is present,
     we delete the record, set redirection back to the index, and abort
    -script execution.

    The database commands:

    [service0@yourserver www]$ emacs note-delete.xql
    <?xml version="1.0"?>
    +script execution.

    The database commands:

    [service0 www]$ emacs note-delete.xql
    <?xml version="1.0"?>
     <queryset>
       <fullquery name="do_delete">
         <querytext>
    @@ -172,14 +172,14 @@
           select samplenote__name(:note_id)
         </querytext>
       </fullquery>
    -</queryset>

    And the adp page:

    [service0@yourserver www]$ emacs note-delete.adp
    <master>
    +</queryset>

    And the adp page:

    [service0 www]$ emacs note-delete.adp
    <master>
     <property name="title">@title@</property>
     <property name="context">{@title@}</property>
     <h2>@title@</h2>
     <formtemplate id="note-del-confirm"></formtemplate>
     </form>

    The ADP is very simple. The formtemplate tag outputs the HTML -form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.

    General_comments

    You can track comments for any ACS Object. Here we'll track +form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.

    General_comments

    You can track comments for any ACS Object. Here we'll track comments for notes. On the notes.tcl/adp pair, which is used to display individual notes, we want to put a link to add comments at the bottom of the screen. If there are any comments, we want to @@ -200,13 +200,13 @@ there are comments. Then you pass the note id, which is also the acs_object id.

    We put our two new variables in the notes.adp page.

    <a href="@comment_add_url@">Add a comment</a>
    -@comments_html@

    Prepare the package for distribution.

    Browse to the package manager. Click on +@comments_html@

    Prepare the package for distribution.

    Browse to the package manager. Click on tutorialapp.

    Click on Generate a distribution file for this package from the filesystem.

    Click on the file size (37.1KB) after the label Distribution File: and save the file to - /tmp.

    + /tmp.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/tutorial-database.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-database.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-database.html 8 Dec 2003 15:41:19 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-database.html 15 Dec 2003 15:03:48 -0000 1.14.2.4 @@ -1,7 +1,7 @@ Setting Up Database Objects

    Setting Up Database Objects

    by Joel Aufrecht

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

    Code the data model

    We create all database objects with scripts in the +

    Code the data model

    We create all database objects with scripts in the myfirstpackage/sql/ directory. All database scripts are database-specific and are thus in either the myfirstpackage/sql/oracle or @@ -36,7 +36,7 @@ @author which will be picked up by the API browser. The string $Id$ will automatically be - expanded when the file is checked in to cvs.

    [service0@yourserver postgresql]$ emacs myfirstpackage-create.sql

    Paste this into the file and save and close.

    Figure�7.2.�Database Creation Script - master create file

    --
    +      expanded when the file is checked in to cvs.

    [service0 postgresql]$ emacs myfirstpackage-create.sql

    Paste this into the file and save and close.

    Figure�7.2.�Database Creation Script - master create file

    --
     -- @author rhs@mit.edu
     -- @cvs-id $Id$
     --
    @@ -60,7 +60,7 @@
         object.  Notice the use of "mfp."  This token, derived from "My
         First Package," ensures that our object is unlikely to conflict
         with objects from other packages.

    Create a database file to drop everything if the package - is uninstalled.

    [service0@yourserver postgresql]$ emacs myfirstpackage-drop.sql

    Figure�7.3.�Database deletion script

    -- packages/myfirstpackage/sql/myfirstpackage-drop.sql
    +        is uninstalled.

    [service0 postgresql]$ emacs myfirstpackage-drop.sql

    Figure�7.3.�Database deletion script

    -- packages/myfirstpackage/sql/myfirstpackage-drop.sql
     -- drop script
     --
     -- @author joel@aufrecht.org
    @@ -73,18 +73,18 @@
     	   't',
     	   't'
         );
    -

    Run the create script manually to add your tables and functions.

    [service0@yourserver postgresql]$ psql -f myfirstpackage-create.sql
    +

    Run the create script manually to add your tables and functions.

    [service0 postgresql]$ psql -f myfirstpackage-create.sql
     psql:myfirstpackage-create.sql:14: NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index 'mfp_notes_pkey' for table 'mfp_notes'
     psql:myfirstpackage-create.sql:14: NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
      content_type__create_type
     ---------------------------
                              0
     (1 row)
     
    -[service0@yourserver postgresql]$

    If there are errors, use them to debug the sql file and try again. If there are errors in the database table creation, you may need to run the drop script to drop the table so that you can recreate it. The drop script will probably have errors since some of the things it's trying to drop may be missing. They can be ignored.

    Once you get the same output as shown above, test the drop script:

    [service0@yourserver postgresql]$ psql -f myfirstpackage-drop.sql
    +[service0 postgresql]$

    If there are errors, use them to debug the sql file and try again. If there are errors in the database table creation, you may need to run the drop script to drop the table so that you can recreate it. The drop script will probably have errors since some of the things it's trying to drop may be missing. They can be ignored.

    Once you get the same output as shown above, test the drop script:

    [service0 postgresql]$ psql -f myfirstpackage-drop.sql
      content_type__drop_type
     -------------------------
                            0
     (1 row)
     
    -[service0@yourserver postgresql]$

    Once both scripts are working without errors, run the create script one last time and proceed.

    View comments on this page at openacs.org
    +[service0 postgresql]$

    Once both scripts are working without errors, run the create script one last time and proceed.

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/tutorial-debug.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-debug.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-debug.html 8 Dec 2003 15:41:19 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-debug.html 15 Dec 2003 15:03:48 -0000 1.14.2.4 @@ -1,7 +1,7 @@ Debugging and Automated Testing

    Debugging and Automated Testing

    Important

    This section is a work in progress.

    by Joel Aufrecht

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

    Debugging

    Developer Support.�The Developer Support package adds several goodies: debug +

    Debugging

    Developer Support.�The Developer Support package adds several goodies: debug information for every page; the ability to log comments to the page instead of the error log, and fast user switching so that you can test pages as anonymous and as dummy users without logging @@ -23,17 +23,17 @@ ?�searches�backward�
    /�searches�forward.�
    ����������

    -

    Manual testing

    Make a list of basic tests to make sure it works

    Test NumActionExpected Result
    001Browse to the index page while not logged in and +

    Manual testing

    Make a list of basic tests to make sure it works

    Test NumActionExpected Result
    001Browse to the index page while not logged in and while one or more notes exist.No edit or delete or add links should appear.
    002Browse to the index page while logged in. An Edit link should appear. Click on it. Fill out the form and click Submit.The text added in the form should be visible on the index page.

    Other things to test: try to delete someone else's note. Try to delete your own note. Edit your own note. - Search for a note.

    Write automated tests

    by Simon Carstensen

    + Search for a note.

    Write automated tests

    by Simon Carstensen

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

    - + It seems to me that a lot of people have been asking for some guidelines on how to write automated tests. I've done several tests by now and have found the process to be Index: openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 8 Dec 2003 15:41:19 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 15 Dec 2003 15:03:48 -0000 1.14.2.4 @@ -1,7 +1,7 @@ Creating a Package

    Creating a Package

    by Joel Aufrecht

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

    The intended page map

    Overview

    To start developing new code in OpenACS, we build a new +

    The intended page map

    Overview

    To start developing new code in OpenACS, we build a new package. A package is a a discrete collection of web pages, tcl code, and database tables and procedures. A package with user interface is called an application; a package which provides @@ -21,11 +21,11 @@

    In this tutorial, we will make an application package for displaying a list of text notes. -

    Before you begin

    You will need:

    • A computer with a working installation of +

    Before you begin

    You will need:

    • A computer with a working installation of OpenACS. If you don't have this, see Chapter�2, Installation Overview.

    • Example files, which are included in the standard OpenACS 5.0.0b4 distribution. -

    Figure�7.1.�Assumptions in this section

    Fully qualified domain name of your serveryourserver.test
    URL of your serverhttp://yourserver.test:8000
    Name of development accountservice0
    New Package keymyfirstpackage

    Use the APM to initialize a new package

    We use the ACS Package Manager (APM) to add, remove, and +

    Figure�7.1.�Assumptions in this section

    Fully qualified domain name of your serveryourserver.test
    URL of your serverhttp://yourserver.test:8000
    Name of development accountservice0
    New Package keymyfirstpackage

    Use the APM to initialize a new package

    We use the ACS Package Manager (APM) to add, remove, and upgrade packages. It handles package meta-data, such as lists of files that belong in the package. Each package is uniquely identified by a package key. To start developing a new @@ -54,7 +54,7 @@

    This creates a package rooted at /var/lib/aolserver/service0/packages/myfirstpackage. This is the "home directory" of our new package, and all - files in the package will be within this directory.

    Mount the package in the site map

    In order to see your work in progress, you must create a + files in the package will be within this directory.

    Mount the package in the site map

    In order to see your work in progress, you must create a map between the URL space of incoming requests and the package. You do this by mounting the package in the Site Map. This creates a link between the incoming URL and an Index: openacs-4/packages/acs-core-docs/www/tutorial-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-pages.html,v diff -u -r1.14.2.3 -r1.14.2.4 --- openacs-4/packages/acs-core-docs/www/tutorial-pages.html 8 Dec 2003 15:41:19 -0000 1.14.2.3 +++ openacs-4/packages/acs-core-docs/www/tutorial-pages.html 15 Dec 2003 15:03:48 -0000 1.14.2.4 @@ -1,8 +1,8 @@ Creating Web Pages

    Creating Web Pages

    by Joel Aufrecht

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

    Install some API

    As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:

    -    
    cp /var/lib/aolserver/service1/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service1/packages/myfirstpackage/tcl/

    To make this file take effect, go to the APM and choose "Reload all files" for "MyFirstPackage".

    Build the "Index" page

    Each user-visible page in your package has, typically, +

    Install some API

    As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:

    +    cp /var/lib/aolserver/service1/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service1/packages/myfirstpackage/tcl/

    To make this file take effect, go to the APM and choose "Reload all files" for "MyFirstPackage".

    Build the "Index" page

    Each user-visible page in your package has, typically, three parts. The tcl file holds the procedural logic for the page, including TCL and database-independent SQL code, and does things like @@ -12,11 +12,11 @@ and -oracle.xql files contains database-specific SQL. The default page in any directory is index, so we'll build that - first, starting with the tcl file:

    [service0@yourserver postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
    +      first, starting with the tcl file:

    [service0 postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
     [service0@yourserver www emacs index.tcl

    Paste this into the file.

    ad_page_contract {
         This is the main page for the package.  It displays all of the Notes and provides links to edit them and to create new Notes.
     
    -    @author Your Name (you@yourserver.test)
    +    @author Your Name (you@example.com)
         @cvs-id $Id$
     }
     
    @@ -72,7 +72,7 @@
         note-edit.tcl:

    ad_page_contract {
         This is the main page for the package.  It displays all of the Notes and provides links to edit them and to create new Notes.
     
    -    @author Your Name (you@yourserver.test)
    +    @author Your Name (you@example.com)
         @cvs-id $Id$
      
         @param item_id If present, assume we are editing that note.  Otherwise, we are creating a new note.
    @@ -117,7 +117,7 @@
     note-delete.tcl:

    ad_page_contract {
         This deletes a note
     
    -    @author Your Name (you@yourserver.test)
    +    @author Your Name (you@example.com)
         @cvs-id $Id$
      
         @param item_id The item_id of the note to delete
    Index: openacs-4/packages/acs-core-docs/www/unix-installation.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/unix-installation.html,v
    diff -u -r1.7.2.3 -r1.7.2.4
    --- openacs-4/packages/acs-core-docs/www/unix-installation.html	8 Dec 2003 15:41:19 -0000	1.7.2.3
    +++ openacs-4/packages/acs-core-docs/www/unix-installation.html	15 Dec 2003 15:03:48 -0000	1.7.2.4
    @@ -1,4 +1,4 @@
    -Install Unix-like system and supporting software

    Install Unix-like system and supporting software

    by Joel Aufrecht

    +Install a Unix-like system and supporting software

    Install a Unix-like system and supporting software

    by Joel Aufrecht

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

    a Unix-like system

    You will need a computer running a unix-like system with the following software installed:

    • tdom

    • tcl

    • gmake and the compile and build Index: openacs-4/packages/acs-core-docs/www/upgrade-detail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/upgrade-detail.html,v diff -u -r1.16.2.3 -r1.16.2.4 --- openacs-4/packages/acs-core-docs/www/upgrade-detail.html 8 Dec 2003 15:41:19 -0000 1.16.2.3 +++ openacs-4/packages/acs-core-docs/www/upgrade-detail.html 15 Dec 2003 15:03:48 -0000 1.16.2.4 @@ -9,7 +9,7 @@ OpenACS prior to 4.5, upgrading will require manual effort.

      It's always a good idea to precede an upgrade attempt with a snapshot backup.

      OpenACS consists of files and a database schema. The files in a new tarball include database upgrade scripts. To start the upgrade, replace your existing files with the new files and then browse to the APM, which will detect the new packages and offer to run the appropriate database upgrade scripts. After restarting the server again, the upgrade is - complete.

      Figure�5.1.�Assumptions in this section

      name of OpenACS usernsadmin
      OpenACS server nameopenacs-dev
      Root of OpenACS file tree/web/openacs-dev
      Database backup directory/backup/openacs/

    Upgrading 4.6.3 to 5.0

    Current working notes in Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results.

    Upgrading 4.5 to 4.6

    The required platform for OpenACS 4.6 is the same as + complete.

    Figure�5.1.�Assumptions in this section

    name of OpenACS usernsadmin
    OpenACS server nameopenacs-dev
    Root of OpenACS file tree/web/openacs-dev
    Database backup directory/backup/openacs/

    Upgrading 4.6.3 to 5.0

    Current working notes in Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results.

    Upgrading 4.5 to 4.6

    The required platform for OpenACS 4.6 is the same as 4.5, with the excepion of OpenFTS. You now need OpenFTS 0.3.2, not 0.2. OpenACS 4.6 does not support PostgreSQL 7.3.

    Upgrade Sequence

    1. Make a Backup.�Back up the database and file system (see the section called “Manual backup and recovery”).

    2. OPTIONAL: Upgrade OpenFTS.�OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible - completing this step will not break a working OpenFTS Engine from 4.5. @@ -32,70 +32,70 @@ cd tsearch/ make make install -exit

    In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.

    [root@localhost root]# su - nsadmin
    -[nsadmin@localhost dev]$ psql openacs-dev -f /usr/local/pgsql/share/contrib/openfts.sql
    +exit

    In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.

    [root root]# su - nsadmin
    +[nsadmin dev]$ psql openacs-dev -f /usr/local/pgsql/share/contrib/openfts.sql
     CREATE
     CREATE
    -[nsadmin@localhost dev]$ psql openacs-dev -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
    +[nsadmin dev]$ psql openacs-dev -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
     BEGIN
     CREATE
     (~30 more lines)
    -[nsadmin@localhost dev]$ exit
    -[root@localhost root]# 
    -
    su - nsadmin
    +[nsadmin dev]$ exit
    +[root root]# 
    +su - nsadmin
     psql openacs-dev -f /usr/local/pgsql/share/contrib/openfts.sql
     psql openacs-dev -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
    -exit
  • +exit

  • Stop the server -

    [root@localhost root]# svc -d /service/openacs-dev
  • Upgrade the file tree.�If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

    • Upgrading files without CVS.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

      [root@localhost root]# su - nsadmin
      -[nsadmin@localhost aolserver]$ cd /web
      -[nsadmin@localhost web]$ tar xzf /tmp/openacs-4-6.tgz
      -[nsadmin@localhost web]$ cp -r openacs-4-6/* openacs-4
      -[nsadmin@localhost openacs-upgrade]$ exit
      -[root@localhost root]#
      -
      su - nsadmin
      +        

      [root root]# svc -d /service/openacs-dev
    • Upgrade the file tree.�If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

      • Upgrading files without CVS.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

        [root root]# su - nsadmin
        +[nsadmin aolserver]$ cd /web
        +[nsadmin web]$ tar xzf /tmp/openacs-4-6.tgz
        +[nsadmin web]$ cp -r openacs-4-6/* openacs-4
        +[nsadmin openacs-upgrade]$ exit
        +[root root]#
        +su - nsadmin
         cd /web
         tar xzf /tmp/openacs-4-6.tgz
         cp -r openacs-4-6/* openacs-4
        -exit
      • +exit

      • Upgrading files with CVS -

        1. Unpack the new files into a working directory.

          [root@localhost root]# su - nsadmin
          -[nsadmin@localhost aolserver]$ cd /tmp
          -[nsadmin@localhost tmp]$ tar xzv openacs-4-6.tgz
          -[nsadmin@localhost tmp]$ cd openacs-4.6
          -

          Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.

          [nsadmin@localhost openacs-4.6]$  cvs import -m "upgrade to OpenACS 4.6" openacs 
          -OpenACS openacs-4-6

          Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.

          [nsadmin@localhost openacs-4.6]$  cd /web
          -[nsadmin@localhost tmp]$ mkdir openacs-upgrade
          -[nsadmin@localhost tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
          +	    

          1. Unpack the new files into a working directory.

            [root root]# su - nsadmin
            +[nsadmin aolserver]$ cd /tmp
            +[nsadmin tmp]$ tar xzv openacs-4-6.tgz
            +[nsadmin tmp]$ cd openacs-4.6
            +

            Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.

            [nsadmin openacs-4.6]$  cvs import -m "upgrade to OpenACS 4.6" openacs 
            +OpenACS openacs-4-6

            Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.

            [nsadmin openacs-4.6]$  cd /web
            +[nsadmin tmp]$ mkdir openacs-upgrade
            +[nsadmin tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
             (CVS feedback here)
            -
            su - nsadmin
            +su - nsadmin
             cd /tmp
             tar xzv openacs-4-6.tgz
             cd openacs-4.6
             cvs import -m "upgrade to OpenACS 4.6" openacs OpenACS openacs-4-6
             cd /tmp
             mkdir openacs-upgrade
             cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
            -
          2. The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.

          3. Once you've fixed any conflicts, commit the new code - to your local tree.

            [nsadmin@localhost tmp]$ cd openacs-upgrade
            -[nsadmin@localhost openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
            -
            cd openacs-upgrade
            -cvs commit -m "Upgraded to 4.6"
          4. Update your working tree with the new +

        2. The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.

        3. Once you've fixed any conflicts, commit the new code + to your local tree.

          [nsadmin tmp]$ cd openacs-upgrade
          +[nsadmin openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
          +cd openacs-upgrade
          +cvs commit -m "Upgraded to 4.6"
        4. Update your working tree with the new files. The CVS flags ensure that new directories are created and pruned directories destroyed.

          -[nsadmin@localhost openacs-upgrade]$ cd /web/openacs-dev
          -[nsadmin@localhost openacs-dev]$ cvs up -Pd
          +[nsadmin openacs-upgrade]$ cd /web/openacs-dev
          +[nsadmin openacs-dev]$ cvs up -Pd
           (CVS feedback)
          -[nsadmin@localhost openacs-dev]$ exit
          -[root@localhost root]#
          -
          cd /web/openacs-dev
          +[nsadmin openacs-dev]$ exit
          +[root root]#
          +cd /web/openacs-dev
           cvs up -Pd
          -exit
    • +exit

  • Start the server -

    [root@localhost root]# svc -u /service/openacs-dev
  • Use APM to upgrade the database.�

    1. Browse to the package manager, http://yourserver/acs-admin/apm.

    2. Click Install packages.

    3. Select the packages you want to install. This should +

      [root root]# svc -u /service/openacs-dev
    4. Use APM to upgrade the database.�

      1. Browse to the package manager, http://yourserver/acs-admin/apm.

      2. Click Install packages.

      3. Select the packages you want to install. This should be everything that says upgrade, plus any new packages you want. It's safest to upgrade the kernel by itself, and then come back and upgrade the rest of the - desired packages in a second pass.

      4. On the next screen, click Install Packages

      5. When prompted, restart the server:

        [root@localhost root]# restart-aolserver openacs-dev
      6. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

      7. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.0.0b4.

    5. OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these + desired packages in a second pass.

    6. On the next screen, click Install Packages

    7. When prompted, restart the server:

      [root root]# restart-aolserver openacs-dev
    8. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

    9. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.0.0b4.

  • OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these steps. (You must have already upgraded the OpenFTS driver to - 0.3.2.)

    1. Browse to http://yourserver/admin/site-map

    2. On the openfts line, click on set parameters.

    3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

    4. Click Set Parameters

    5. [root@localhost root]# restart-aolserver openacs-dev
    6. Browse to http://yourserver/openfts

    7. Click Administration.

    8. Click Initialize OpenFTS Engine

  • Rollback.�If anything goes wrong, roll back to the backup snapshot.

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

    1. Browse to http://yourserver/admin/site-map

    2. On the openfts line, click on set parameters.

    3. Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/

    4. Click Set Parameters

    5. [root root]# restart-aolserver openacs-dev
    6. Browse to http://yourserver/openfts

    7. Click Administration.

    8. Click Initialize OpenFTS Engine

  • Rollback.�If anything goes wrong, roll back to the backup snapshot.

  • ($Id$)
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/variables.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/variables.html,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-core-docs/www/variables.html 8 Dec 2003 15:41:19 -0000 1.1.2.2 +++ openacs-4/packages/acs-core-docs/www/variables.html 15 Dec 2003 15:03:48 -0000 1.1.2.3 @@ -3,7 +3,7 @@ by OpenACS documentation staff.

    Date and Time Variables

    Starting with OpenACS 5.0 and the introduction of acs-lang, we recommend retrieving date/time information from the database in - ANSI format and then using lc_time_fmt to format it for display.

    Example�9.1.�Getting datetime from the database ANSI-style

    db_multirow -extend { mydate_pretty } {
    +    ANSI format and then using lc_time_fmt to format it for display.

    Example�9.1.�Getting datetime from the database ANSI-style

    db_multirow -extend { mydate_pretty } {
         select to_char(mydate, 'YYYY-MM-DD HH24:MI:SS') as mydate_ansi,
               ...
         ...
    Index: openacs-4/packages/acs-core-docs/www/images/ext-auth.png
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/images/ext-auth.png,v
    diff -u -r1.1 -r1.1.2.1
    Binary files differ