From: rsoulliere Date: Wed, 13 Apr 2011 19:26:16 +0000 (-0400) Subject: Add postgresql 9.0 upgrading instructions for Debian and Ubuntu. Debian instructions... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4569f71b2b541fd539dcadf9c1c4596ef05e29bf;p=contrib%2FConifer.git Add postgresql 9.0 upgrading instructions for Debian and Ubuntu. Debian instructions provided by Bill Erickson via the DEV list. --- diff --git a/1.6/admin/migratingdata_1.6.xml b/1.6/admin/migratingdata_1.6.xml index 26b96bba45..4558d06066 100644 --- a/1.6/admin/migratingdata_1.6.xml +++ b/1.6/admin/migratingdata_1.6.xml @@ -492,8 +492,8 @@ CREATE TABLE students ( possibilities. ident_type is the identification type used for identiying users. This is a integer value referencing config.identification_type and should - match the id values of that table. The default values are 1 for Drivers License, 2for SSN or - 3for other. + match the id values of that table. The default values are 1 for Drivers License, 2 for SSN or + 3 for other. home_ou is the home organizational unit for the user. This value needs to match the corresponding id in the actor.org_unit table. diff --git a/2.0/admin/Upgrading-Evergreen-2.0.xml b/2.0/admin/Upgrading-Evergreen-2.0.xml index 84a540838a..f99969d48d 100644 --- a/2.0/admin/Upgrading-Evergreen-2.0.xml +++ b/2.0/admin/Upgrading-Evergreen-2.0.xml @@ -331,59 +331,137 @@ cd /openils/bin on finding solutions and seeking further assistance from the Evergreen community. -
- Upgrading PostgreSQL from 8.2 to 8.4 (if required) - Evergreen 2.0 requires PostgreSQL version 8.4 or later. - The order of the following steps is very important.databasesPostgreSQL - - - As opensrf, stop the evergreen and opensrf services: - osrf_ctl.sh -l -a stop_all - - - Backup the Evergreen database data - - - Upgrade to Postgresql 8.4 by removing old version and installing Postgresql 8.4 - - - Create an empty Evergreen database in postgresql 8.4 by issuing the following commands as the postgres user: - - -createdb -E UNICODE evergreen +
+ Upgrading PostgreSQL from 8.4 to 9.0 + + Upgrading PostgreSQL on Debian Squeez + + + Stop Evergreen and disconnect clients from database. + + + Add the following line to /etc/apt/sources.list: + +deb http://www.backports.org/debian squeeze-backports main contrib non-free + + + + Update the sources list on your server. + +apt-get update + + + + Backup your databases + +$ pg_dump [db connect args] [db name] > evergreen-backup.sql + + + + Install PostgreSQL 9.0 as well as the client, contrib and plperl support packages. + +apt-get -t squeeze-backports install postgresql-9.0 postgresql-client-9.0 postgresql-contrib-9.0 postgresql-plperl-9.0 + + + + Drop the empty 9.0 cluster. + +pg_dropcluster --stop 9.0 main + + + + Update the 8.4 cluster (with evergreen database) to 9.0 + +pg_upgradecluster 8.4 main + + + + Test by logging into psql, checking the postgrSQL version and running a simple SELECT query. + +psql -U evergreen +evergreen=# select version(); +evergreen=# select count(*) from biblio.record_entry; + + + + Restart Evergreen and Apache. + + + Drop old 8.4 cluster (optional). + +pg_dropcluster 8.4 main + + + + + + Upgrading PostgreSQL on Ubuntu 10.04 + + + Stop Evergreen and disconnect clients from database. + + + Add the backport repository to your repository sources list: + +sudo add-apt-repository ppa:pitti/postgresql + + + + Update the sources list on your server. + +apt-get update + + + + As the postgres user, backup your PostgreSQL databases. + data +]]> + + + As root, remove PostgreSQL 8.4 and install 9.0. + +aptitude purge postgresql-8.4 +aptitude install postgresql-9.0 postgresql-client-9.0 postgresql-contrib-9.0 postgresql-plperl-9.0 + + + + as the postgres user, recreate empty evergreen databases with required language supports. + +dropdb evergreen +createdb -T template0 --lc-ctype=C --lc-collate=C -E UNICODE evergreen createlang plperl evergreen createlang plperlu evergreen createlang plpgsql evergreen -psql -f /usr/share/postgresql/8.4/contrib/tablefunc.sql evergreen -psql -f /usr/share/postgresql/8.4/contrib/tsearch2.sql evergreen -psql -f /usr/share/postgresql/8.4/contrib/pgxml.sql evergreen - - - - - As the postgres user on the PostgreSQL server, create a PostgreSQL user named evergreen for the database cluster: - createuser -P -s evergreen - Enter the password for the new PostgreSQL superuser (evergreen) - - - Restore data from backup created in step 1. - - - To point tsearch2 to proper function names in 8.4, run the SQL script - /home/opensrf/Evergreen-ILS*/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql using the psql command. - cd /home/opensrf/Evergreen-ILS* - psql -f /Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql evergreen - - - Restart Evergreen and OpenSRF services - - - For additional information regarding upgrading PostgreSQL, see the following documentation in PostgreSQL: - - - - - - +psql -f /usr/share/postgresql/9.0/contrib/tablefunc.sql evergreen +psql -f /usr/share/postgresql/9.0/contrib/tsearch2.sql evergreen +psql -f /usr/share/postgresql/9.0/contrib/pgxml.sql evergreen + + + + Update the 8.4 cluster (with evergreen database) to 9.0. + +pg_upgradecluster 8.4 main + + + + as the postgres user, load data from backup into PostgreSQL 9.0. + + + + Restart Evergreen and Apache. + + + Test by logging into psql, checking the postgrSQL version and running a simple SELECT query. + +psql -U evergreen +evergreen=# select version(); +evergreen=# select count(*) from biblio.record_entry; + + + +
diff --git a/2.0/admin/migratingdata_2.0.xml b/2.0/admin/migratingdata_2.0.xml index 2fd41c2b05..3b4c5a6464 100644 --- a/2.0/admin/migratingdata_2.0.xml +++ b/2.0/admin/migratingdata_2.0.xml @@ -487,7 +487,7 @@ CREATE TABLE students ( possibilities. ident_type is the identification type used for identiying users. This is a integer value referencing config.identification_type and should match the id values of that table. The default values are - 1 for Drivers License, 2for SSN or 3for other. + 1 for Drivers License, 2 for SSN or 3 for other. home_ou is the home organizational unit for the user. This value needs to match the corresponding id in the actor.org_unit table.