Index: openacs-4/packages/acs-core-docs/www/upgrade-supporting.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-supporting.html,v diff -u -N -r1.14 -r1.14.2.1 --- openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 7 Jun 2008 20:28:51 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 10 Jun 2009 22:24:09 -0000 1.14.2.1 @@ -1,6 +1,6 @@ - -Upgrading Platform components

Upgrading Platform components

Upgrading OpenFTS from 0.2 to 0.3.2

OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

  1. Uninstall the old OpenFTS Engine from the $OPENACS_SERVICE_NAME database.

    1. Browse to http://yourserver/openfts. -

    2. Click Administration.

    3. Click Drop OpenFTS Engine

  2. Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)

    cd /usr/local/src/
    +
    +Upgrading Platform components

    Upgrading Platform components

    Upgrading OpenFTS from 0.2 to 0.3.2

    OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

    1. Uninstall the old OpenFTS Engine from the $OPENACS_SERVICE_NAME database.

      1. Browse to http://yourserver/openfts. +

      2. Click Administration.

      3. Click Drop OpenFTS Engine

    2. Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)

      cd /usr/local/src/
                 tar xzf /var/tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
                 chown -R root.root Search-OpenFTS-tcl-0.3.2/
                 cd Search-OpenFTS-tcl-0.3.2/
      @@ -18,22 +18,22 @@
                 cd tsearch/
                 make
                 make install
      -          exit

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

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

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

      [root root]# su - $OPENACS_SERVICE_NAME
      +          [$OPENACS_SERVICE_NAME dev]$ psql $OPENACS_SERVICE_NAME -f /usr/local/pgsql/share/contrib/openfts.sql
                 CREATE
                 CREATE
      -          [$OPENACS_SERVICE_NAME dev]$ psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
      +          [$OPENACS_SERVICE_NAME dev]$ psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
                 BEGIN
                 CREATE
                 (~30 more lines)
      -          [$OPENACS_SERVICE_NAME dev]$ exit
      +          [$OPENACS_SERVICE_NAME dev]$ exit
                 [root root]# 
                 su - $OPENACS_SERVICE_NAME
       psql $OPENACS_SERVICE_NAME -f /usr/local/pgsql/share/contrib/openfts.sql
       psql $OPENACS_SERVICE_NAME -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
      -exit
    3. OPTIONAL: Install the new OpenFTS Engine.�If you want to upgrade the OpenFTS Engine, do these +exit

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

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

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

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

    4. Click Set Parameters

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

    7. Click Administration.

    8. Click Initialize OpenFTS Engine

Upgrading from PostGreSQL 7.2 to 7.3

An OpenACS database created in PostGreSQL 7.2 will not + 0.3.2.)

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

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

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

  4. Click Set Parameters

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

  7. Click Administration.

  8. Click Initialize OpenFTS Engine

Upgrading from PostGreSQL 7.2 to 7.3

An OpenACS database created in PostGreSQL 7.2 will not work correctly in PostGreSQL 7.3. This is because 7.2 truncates function names to 31 characters, but 7.3 does not. This does not cause problems in 7.2, because truncation occurs both at @@ -43,12 +43,12 @@ are not, and so they don't match. Also some functions use casting commands that no longer work in 7.3 and these functions must be recreated.

- To upgrade an OpenACS site from PostGreSQL 7.2 to 7.3, first upgrade the kernel to 4.6.3. Then, dump the database, run the upgrade script /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin/pg_7.2to7.3_upgrade_helper.pl on the dump file, and reply the dump. See Forum OpenACS Q&A: PG 7.2->7.3 upgrade gotcha?. Example:

  1. Back up the database as per PostgreSQL.

  2. Run the upgrade script on the backup file.

    [root root]# su - $OPENACS_SERVICE_NAME
    -          [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]# cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin
    -          [$OPENACS_SERVICE_NAME bin]$ ./pg_7.2to7.3_upgrade_helper.pl \
    +      To upgrade an OpenACS site from PostGreSQL 7.2 to 7.3, first upgrade the kernel to 4.6.3.  Then, dump the database, run the upgrade script /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin/pg_7.2to7.3_upgrade_helper.pl on the dump file, and reply the dump.  See Forum OpenACS Q&A: PG 7.2->7.3 upgrade gotcha?.  Example:

    1. Back up the database as per PostgreSQL.

    2. Run the upgrade script on the backup file.

      [root root]# su - $OPENACS_SERVICE_NAME
      +          [$OPENACS_SERVICE_NAME $OPENACS_SERVICE_NAME]# cd /var/lib/aolserver/$OPENACS_SERVICE_NAME/bin
      +          [$OPENACS_SERVICE_NAME bin]$ ./pg_7.2to7.3_upgrade_helper.pl \
                 ../database-backup/nightly.dmp \
                 ../database-backup/upgrade-7.3.dmp \
      -          /var/lib/aolserver/$OPENACS_SERVICE_NAME
      +          /var/lib/aolserver/$OPENACS_SERVICE_NAME
                 ==================================================================
                 looking for function acs_object__check_object_ancest in oacs
                 grep result: /var/lib/aolserver/aufrecht-dev/packages/acs-kernel/sql/postgresql/acs-objects-create.sql:create function acs_object__check_object_ancestors (integer,integer,integer)
      @@ -57,23 +57,23 @@
       
                 (many lines omitted)
                 [$OPENACS_SERVICE_NAME bin]$
      -          
    3. Use perl to replace timestamp with timestamptz in the dump file. See example perl code in step two in /contrib/misc/upgrade_4.6_to_5.0.sh

    4. Create a new user for PostgreSQL 7.3.x, as per the +

  3. Use perl to replace timestamp with timestamptz in the dump file. See example perl code in step two in /contrib/misc/upgrade_4.6_to_5.0.sh

  4. Create a new user for PostgreSQL 7.3.x, as per the Postgres installation guide. Keep in mind that your installation location is different, and your startup script (/etc/init.d/postgres73 should be named differently. You might even need to edit that file to make the paths - correct). You'll also need to add export - PGPORT=5434 to the .bashrc and/or + correct). You'll also need to add export + PGPORT=5434 to the .bashrc and/or .bash_profile for the postgres73 user. -

  5. Install PostgreSQL 7.3.x. Note that you PostgreSQL +

  6. Install PostgreSQL 7.3.x. Note that you PostgreSQL must listen on a different port in order to work correctly, so you'll need to edit the configuration file (/usr/local/pgsql73/data/postgresql.conf) and change the port (to 5433, say). create a second postgres user to differentiate between the two postgres installs. When you do ./configure, you'll need to include --prefix=$HOME to ensure that it is installed in the - postgres73 user's home directory.

  7. Change the path in + postgres73 user's home directory.

  8. Change the path in $OPENACS_SERVICE_NAME's .bashrc or .bash_profile (or both) files to reflect the new postgres73 - user directory. Also add in the PGPORT.

  9. Restore the database from dump as per the recovery instructions.

View comments on this page at openacs.org
+ user directory. Also add in the PGPORT.

  • Restore the database from dump as per the recovery instructions.

  • View comments on this page at openacs.org