Index: openacs-4/packages/acs-core-docs/www/openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v diff -u -r1.6.2.9 -r1.6.2.10 --- openacs-4/packages/acs-core-docs/www/openacs.html 30 Apr 2003 02:55:29 -0000 1.6.2.9 +++ openacs-4/packages/acs-core-docs/www/openacs.html 4 May 2003 06:30:02 -0000 1.6.2.10 @@ -3,7 +3,7 @@ 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 an OpenACS Service

  1. The reference install stores all OpenACS services in +

Set up the file system for an OpenACS Service

  1. The reference install stores all OpenACS services in /web, with one subdirectory per service. The first time you install a service, you must create that directory and set its permissions:

    [root@yourserver root]# mkdir /web
    @@ -72,8 +72,8 @@
     
     [root@yourserver root]#
  2. 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 /web
    -[service0@yourserver web]$ tar xzf /tmp/openacs-4.6.2.tgz
    -[service0@yourserver web]$ mv openacs-4.6.2 service0
    +[service0@yourserver web]$ tar xzf /tmp/openacs-4.6.3.tgz
    +[service0@yourserver web]$ mv openacs-4.6.3 service0
     [service0@yourserver web]$ chmod -R 700 service0
     [service0@yourserver web]$ ls -al
     total 3
    @@ -86,10 +86,10 @@
     [root@yourserver root]#
     
    su - service0
     cd /web
    -tar xzf /tmp/openacs-4.6.2.tgz
    -mv openacs-4.6.2 service0
    +tar xzf /tmp/openacs-4.6.3.tgz
    +mv openacs-4.6.3 service0
     chmod -R 700 service0/
    -exit
  3. Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to add +exit

  4. Add the Service to CVS - OPTIONAL.�If this is a development server, you may want to 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
      @@ -108,11 +108,11 @@
                   plus this string,
                   i.e.
                   /cvsroot/service0.
      -            "OpenACS" is the vendor tag, and "openacs-4-6-2" is the
      +            "OpenACS" is the vendor tag, and "openacs-4-6-3" 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-4-6-2
      +[service0@yourserver service0]$ cvs import -m "initial install" service0 OpenACS openacs-4-6-3
       N service0/license.txt
       N service0/readme.txt
       (many lines omitted)
      @@ -123,7 +123,7 @@
       [service0@yourserver service0]$
       
      su - service0
       cd /web/service0
      -cvs import -m "initial install" service0 OpenACS openacs-4-6-2

      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 ..
      +cvs import -m "initial install" service0 OpenACS openacs-4-6-3

      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 checkout: Updating service0
      @@ -294,25 +294,25 @@
       CREATE DATABASE
       [service0@yourserver service0]$
       
      su - service0
      -createdb service0
    2. 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.

      [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 * * * /usr/local/pgsql/bin/vacuumdb service0
    3. Add Full Text Search Support - OPTIONAL

      If you are installing Full Text Search, add required packages to the new database.

      [service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
      +createdb service0
    4. 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.

      [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 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
    5. Add Full Text Search Support - OPTIONAL

      If you are installing Full Text Search, add required packages to the new database.

      [service0@yourserver 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.3/contrib/pgsql_contrib_openfts/openfts.sql
      +[service0@yourserver 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.3/contrib/tsearch/tsearch.sql
      -/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts/openfts.sql
    6. [service0@yourserver service0]$ exit
      +
      /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
    7. [service0@yourserver service0]$ exit
       logout
       
       [root@yourserver root]# 

Configure an AOLserver Service for OpenACS

  1. The AOLserver architecture lets you run an arbitrary number of virtual servers. A virtual server is an HTTP service running on a specific port, e.g. port 80. In order for OpenACS to work, you - need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball. Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.

    [root@yourserver root]# su - service0
    +	  need to configure a virtual server.  The Reference Platform uses a configuration file included in the OpenACS tarball.  Copy it to the /web/service0/etc directory and open it in an editor to adjust the parameters.

    [root@yourserver root]# su - service0
     [service0@yourserver service0]$ cd /web/service0/etc
     [service0@yourserver etc]# cp /web/service0/packages/acs-core-docs/www/files/config.tcl.txt config.tcl
     [service0@yourserver etc]# emacs config.tcl
    @@ -361,7 +361,7 @@
     S/Sd2MYA0JVmQuIt5bYowXR1KYKDka1d3DUgtoVTiFepIRUrMkZlCli08mWVjE6T
     (11 lines omitted)
     1MU24SHLgdTfDJprEdxZOnxajnbxL420xNVc5RRXlJA8Xxhx/HBKTw==
    ------END RSA PRIVATE KEY-----

Verify AOLserver startup

  1. +-----END RSA PRIVATE KEY-----

Verify AOLserver startup

  1. Kill any current running AOLserver processes and start a new one. (Note, if you are using Oracle, rather than PostgreSQL, replace nsd-postgres with @@ -520,7 +520,7 @@ line, click Install.

  • Restart the service.

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

  • Back up the New Service - OPTIONAL

    This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.

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

    Back up the New Service - OPTIONAL

    This is a very good time to back the service, even if it's not a production service. Making a backup now lets you roll back to this initial, clean setup at any point in the future, without repeating the install process. A full OpenACS service backup includes everything in the /web/service0/ directory. At this point it's probably sufficient to back up just the database, because you can recover the files from a tarball.

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

    Set up Automated Backup - OPTIONAL

    Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)

    A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”

    [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 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_$(date +%Y-%m-%d).dmp service0

    If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_nightly.dmp service0

    Set up Log Analysis Reports - OPTIONAL

    Analog is a program with processes webserver access logs, +ls -al /web/service0/database-backup

  • Oracle - INCOMPLETE.�

  • Set up Automated Backup - OPTIONAL

    Backup can encompass all files in /web/service0. For a development server, putting the files in cvs is sufficient. (It's important then to back up the cvs repository!)

    A quick way to automate database backup is a cron job. This is not recommended for production and is not part of the Reference Platform, because it is not cross-platform and can fail silently. More thorough methods are documented in the section called “Backup Strategy”

    [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 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_$(date +%Y-%m-%d).dmp service0

    If you plan to back up the whole /web/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /web/service0/database-backup/service0_nightly.dmp service0

    Set up Log Analysis Reports - OPTIONAL

    Analog is a program with processes webserver access logs, performs DNS lookup, and outputs HTML reports. Analog should already be installed. A modified configuration file is included in @@ -561,4 +561,4 @@ [root@yourserver root]# emacs /etc/cron.daily/analog

    Put this into the file:

    #!/bin/sh
     
    -/usr/share/analog-5.31/analog -G -g/web/service0/etc/analog.cfg
    [root@yourserver root]# chmod 755 /etc/cron.daily/analog

    Test it by running the script.

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

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

    Next Steps

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

    Test it by running the script.

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

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

    Next Steps

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